login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
January
»
9
Re: [patch 07/19] (NEW) add some sanity checks to get_scan_ratio
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...>
To: Rik van Riel <riel@...>
Cc: <linux-kernel@...>, <linux-mm@...>
Subject:
Re: [patch 07/19] (NEW) add some sanity checks to get_scan_ratio
Date: Wednesday, January 9, 2008 - 12:16 am
On Tue, 08 Jan 2008 15:59:46 -0500 Rik van Riel <riel@redhat.com> wrote:
quoted text
> The access ratio based scan rate determination in get_scan_ratio > works ok in most situations, but needs to be corrected in some > corner cases: > - if we run out of swap space, do not bother scanning the anon LRUs > - if we have already freed all of the page cache, we need to scan > the anon LRUs > > Signed-off-by: Rik van Riel <riel@redhat.com> > > Index: linux-2.6.24-rc6-mm1/mm/vmscan.c > =================================================================== > --- linux-2.6.24-rc6-mm1.orig/mm/vmscan.c 2008-01-07 17:33:50.000000000 -0500 > +++ linux-2.6.24-rc6-mm1/mm/vmscan.c 2008-01-07 17:57:49.000000000 -0500 > @@ -1182,7 +1182,7 @@ static unsigned long shrink_list(enum lr > static void get_scan_ratio(struct zone *zone, struct scan_control * sc, > unsigned long *percent) > { > - unsigned long anon, file; > + unsigned long anon, file, free; > unsigned long anon_prio, file_prio; > unsigned long rotate_sum; > unsigned long ap, fp; > @@ -1230,6 +1230,20 @@ static void get_scan_ratio(struct zone * > else if (fp > 100) > fp = 100; > percent[1] = fp; > + > + free = zone_page_state(zone, NR_FREE_PAGES); > + > + /* > + * If we have no swap space, do not bother scanning anon pages > + */ > + if (nr_swap_pages <= 0) > + percent[0] = 0;
Doesn't this mean that swap-cache in ACTIVE_ANON_LIST is not scanned ? Or swap-cache is in File-Cache list ? Thanks, -Kame --
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:
[patch 07/19] (NEW) add some sanity checks to get_scan_ratio
, Rik van Riel
, (Tue Jan 8, 4:59 pm)
Re: [patch 07/19] (NEW) add some sanity checks to get_scan_r...
, KAMEZAWA Hiroyuki
, (Wed Jan 9, 12:16 am)
Re: [patch 07/19] (NEW) add some sanity checks to get_scan_r...
, Rik van Riel
, (Wed Jan 9, 8:53 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Chuck Ebbert
Why do so many machines need "noapic"?
Paul Jackson
Re: cpuset-remove-sched-domain-hooks-from-cpusets
FUJITA Tomonori
Re: Integration of SCST in the mainstream Linux kernel
git
:
linux-netdev
:
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
James Morris
Re: [GIT]: Networking
Evgeniy Polyakov
Re: [BUG] New Kernel Bugs
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
5 users
and
856 guests
online.
Online users
zeekec
cpainfo
fatlossqueen67
K-Z
net4millionaire
Syndicate