login
Login
/
Register
Search
Header Space
Forums
News
Jobs
Blogs
Features
Man Pages
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
February
»
26
Re: [RFC][PATCH] page reclaim throttle take2
view
thread
Score:
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Peter Zijlstra <a.p.zijlstra@...>
To: KOSAKI Motohiro <kosaki.motohiro@...>
Cc: <linux-kernel@...>, <linux-mm@...>, KAMEZAWA Hiroyuki <kamezawa.hiroyu@...>, Balbir Singh <balbir@...>, Rik van Riel <riel@...>, Lee Schermerhorn <Lee.Schermerhorn@...>, Nick Piggin <npiggin@...>
Subject:
Re: [RFC][PATCH] page reclaim throttle take2
Date: Tuesday, February 26, 2008 - 5:18 pm
On Tue, 2008-02-26 at 11:32 +0900, KOSAKI Motohiro wrote:
quoted text
> Index: b/include/linux/mmzone.h > =================================================================== > --- a/include/linux/mmzone.h 2008-02-25 21:37:49.000000000 +0900 > +++ b/include/linux/mmzone.h 2008-02-26 10:12:12.000000000 +0900 > @@ -335,6 +335,9 @@ struct zone { > unsigned long spanned_pages; /* total size, including holes */ > unsigned long present_pages; /* amount of memory (excluding holes) */ > > + > + atomic_t nr_reclaimers; > + wait_queue_head_t reclaim_throttle_waitq; > /* > * rarely used fields: > */
Small nit, that extra blank line seems at the wrong end of the text block :-)
quoted text
> Index: b/mm/vmscan.c > =================================================================== > --- a/mm/vmscan.c 2008-02-25 21:37:49.000000000 +0900 > +++ b/mm/vmscan.c 2008-02-26 10:59:38.000000000 +0900 > @@ -1252,6 +1252,55 @@ static unsigned long shrink_zone(int pri > return nr_reclaimed; > } > > + > +#define RECLAIM_LIMIT (3) > + > +static int do_shrink_zone_throttled(int priority, struct zone *zone, > + struct scan_control *sc, > + unsigned long *ret_reclaimed) > +{ > + u64 start_time; > + int ret = 0; > + > + start_time = jiffies_64; > + > + wait_event(zone->reclaim_throttle_waitq, > + atomic_add_unless(&zone->nr_reclaimers, 1, RECLAIM_LIMIT)); > + > + /* more reclaim until needed? */ > + if (scan_global_lru(sc) && > + !(current->flags & PF_KSWAPD) && > + time_after64(jiffies, start_time + HZ/10)) { > + if (zone_watermark_ok(zone, sc->order, 4*zone->pages_high, > + MAX_NR_ZONES-1, 0)) { > + ret = -EAGAIN; > + goto out; > + } > + } > + > + *ret_reclaimed += shrink_zone(priority, zone, sc); > + > +out: > + atomic_dec(&zone->nr_reclaimers); > + wake_up_all(&zone->reclaim_throttle_waitq); > + > + return ret; > +}
Would it be possible - and worthwhile - to make this FIFO fair? --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[RFC][PATCH] page reclaim throttle take2
, KOSAKI Motohiro
, (Mon Feb 25, 10:32 pm)
Re: [RFC][PATCH] page reclaim throttle take2
, Peter Zijlstra
, (Tue Feb 26, 5:18 pm)
Re: [RFC][PATCH] page reclaim throttle take2
, KOSAKI Motohiro
, (Wed Feb 27, 12:26 am)
Re: [RFC][PATCH] page reclaim throttle take2
, Balbir Singh
, (Wed Feb 27, 12:27 am)
Re: [RFC][PATCH] page reclaim throttle take2
, KOSAKI Motohiro
, (Wed Feb 27, 12:45 am)
Re: [RFC][PATCH] page reclaim throttle take2
, KAMEZAWA Hiroyuki
, (Wed Feb 27, 1:00 am)
Re: [RFC][PATCH] page reclaim throttle take2
, KOSAKI Motohiro
, (Wed Feb 27, 1:04 am)
Re: [RFC][PATCH] page reclaim throttle take2
, Balbir Singh
, (Wed Feb 27, 1:03 am)
Re: [RFC][PATCH] page reclaim throttle take2
, David Rientjes
, (Wed Feb 27, 1:19 am)
Re: [RFC][PATCH] page reclaim throttle take2
, KOSAKI Motohiro
, (Wed Feb 27, 1:33 am)
Re: [RFC][PATCH] page reclaim throttle take2
, David Rientjes
, (Wed Feb 27, 1:47 am)
Re: [RFC][PATCH] page reclaim throttle take2
, Balbir Singh
, (Wed Feb 27, 1:48 am)
Re: [RFC][PATCH] page reclaim throttle take2
, KOSAKI Motohiro
, (Wed Feb 27, 2:52 am)
Re: [RFC][PATCH] page reclaim throttle take2
, David Rientjes
, (Wed Feb 27, 2:09 am)
Re: [RFC][PATCH] page reclaim throttle take2
, Balbir Singh
, (Wed Feb 27, 3:59 am)
Re: [RFC][PATCH] page reclaim throttle take2
, David Rientjes
, (Wed Feb 27, 4:47 am)
Re: [RFC][PATCH] page reclaim throttle take2
, Balbir Singh
, (Wed Feb 27, 5:01 am)
Re: [RFC][PATCH] page reclaim throttle take2
, Peter Zijlstra
, (Wed Feb 27, 5:44 am)
Re: [RFC][PATCH] page reclaim throttle take2
, KOSAKI Motohiro
, (Wed Feb 27, 3:10 am)
Re: [RFC][PATCH] page reclaim throttle take2
, David Rientjes
, (Wed Feb 27, 3:19 am)
Re: [RFC][PATCH] page reclaim throttle take2
, Rik van Riel
, (Wed Feb 27, 11:30 am)
Re: [RFC][PATCH] page reclaim throttle take2
, KAMEZAWA Hiroyuki
, (Wed Feb 27, 3:51 am)
Re: [RFC][PATCH] page reclaim throttle take2
, David Rientjes
, (Wed Feb 27, 3:56 am)
Re: [RFC][PATCH] page reclaim throttle take2
, KAMEZAWA Hiroyuki
, (Wed Feb 27, 4:09 am)
Re: [RFC][PATCH] page reclaim throttle take2
, KOSAKI Motohiro
, (Wed Feb 27, 1:13 am)
Re: [RFC][PATCH] page reclaim throttle take2
, KAMEZAWA Hiroyuki
, (Tue Feb 26, 8:50 pm)
Navigation
Create content
Mailing list archives
Recent posts
Mail archive search
Enter your search terms.
all mailing lists
alsa-devel
dragonflybsd-bugs
dragonflybsd-commit
dragonflybsd-docs
dragonflybsd-kernel
dragonflybsd-submit
dragonflybsd-user
freebsd-announce
freebsd-bugs
freebsd-chat
freebsd-cluster
freebsd-current
freebsd-drivers
freebsd-embeded
freebsd-fs
freebsd-hackers
freebsd-hardware
freebsd-mobile
freebsd-net
freebsd-performance
freebsd-pf
freebsd-security
freebsd-security-notifications
freebsd-threads
git
git-commits-head
linux-activists
linux-arm
linux-ath5k-devel
linux-btrfs
linux-c-programming
linux-driver-devel
linux-ext4
linux-fsdevel
linux-ia64
linux-input
linux-kernel
linux-kernel-janitors
linux-kernel-mentors
linux-kernel-newbies
linux-kvm
linux-net
linux-netdev
linux-newbie
linux-nfs
linux-raid
linux-scsi
linux-security-module
linux-sparse
linux-usb
linux-usb-devel
madwifi-devel
netbsd-announce
netbsd-tech-kern
open-graphics
open-graphics-announce-kt
openbsd-announce
openbsd-bugs
openbsd-ipv6
openbsd-misc
openbsd-security-announce
openbsd-smp
openbsd-source-changes
openbsd-tech
openfabrics-general
openmoko-community
openmoko-devel
openmoko-kernel
reiserfs-devel
tux3
ucarp
Optionally limit your search to a specific mailing list.
advanced
Popular discussions
linux-kernel
:
Chuck Ebbert
Why do so many machines need "noapic"?
Jesper Juhl
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Joe Perches
Re: [RFC] New kernel-message logging API
Ken Chen
[patch] remove artificial software max_loop limit
git
:
walt
[VOTE] git versus mercurial
Linus Torvalds
People unaware of the importance of "git gc"?
Junio C Hamano
Re: git + ssh + key authentication feature-request
Martin Langhoff
Handling large files with GIT
openbsd-misc
:
Christian Weisgerber
Re: libiconv problem
Richard Stallman
Real men don't attack straw men
Daniel Ouellet
Show your appreciation and get your 4.2 DVD
new_guy
Code signing in OpenBSD
linux-activists
:
David C. Niemi
Re: rsh: "rcmd: socket: Permission denied"
Peter MacDonald
demand paging: proposal
Peter Grehan
TCP SYN_RECV state: stuck forever in accept() ?
Dennis Robinson
Source for uptime, df, ps ?
Latest forum posts
sis190/191 gigabit ethernet driver
25 minutes ago
Linux general
read /dev/mem not working in 2.6
1 day ago
Linux general
Fedora with Windows vista : windows explorer restarts
1 day ago
Windows
Intel Graphics Drivers (IEGD 9.0.2) - help in patching for kernels > 2.6.24
1 day ago
Linux kernel
Porting from Windows to Linux
1 day ago
Linux general
Serial Driver Implementation Help
2 days ago
Linux kernel
aacraid bad
2 days ago
Linux general
Tools: GCC 3.4.6, Final GCC 3 Release
3 days ago
Applications and Utilities
GNU/Hurd is so awful
4 days ago
GNU/Hurd
Issues with NETLINK sockets
1 week ago
Linux kernel
Show all forums...
Recent Tags
more tags
Colocation donated by:
Who's online
There are currently
1 user
and
822 guests
online.
Online users
bartman
Syndicate
speck-geostationary