Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-04-18 Thread Mel Gorman
On Thu, Apr 18, 2013 at 08:01:05AM -0700, Johannes Weiner wrote: > On Thu, Apr 11, 2013 at 08:57:50PM +0100, Mel Gorman wrote: > > @@ -1841,17 +1848,58 @@ static void shrink_lruvec(struct lruvec *lruvec, > > struct scan_control *sc) > > lruve

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-04-18 Thread Johannes Weiner
On Thu, Apr 11, 2013 at 08:57:50PM +0100, Mel Gorman wrote: > @@ -1841,17 +1848,58 @@ static void shrink_lruvec(struct lruvec *lruvec, > struct scan_control *sc) > lruvec, sc); > } > } > + > +

[PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-04-11 Thread Mel Gorman
Simplistically, the anon and file LRU lists are scanned proportionally depending on the value of vm.swappiness although there are other factors taken into account by get_scan_count(). The patch "mm: vmscan: Limit the number of pages kswapd reclaims" limits the number of pages kswapd reclaims but i

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-04-11 Thread Mel Gorman
On Thu, Apr 11, 2013 at 09:14:19AM +0900, Kamezawa Hiroyuki wrote: > > > >nr[lru] at the end there is pages remaining to be scanned not pages > >scanned already. > > yes. > > >Did you mean something like this? > > > >nr[lru] = scantarget[lru] * percentage / 100 - (scantarget[lru] - nr[lru]) > > >

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-04-10 Thread Kamezawa Hiroyuki
(2013/04/10 23:08), Mel Gorman wrote: On Wed, Apr 10, 2013 at 04:16:47PM +0900, Kamezawa Hiroyuki wrote: (2013/04/09 20:06), Mel Gorman wrote: Simplistically, the anon and file LRU lists are scanned proportionally depending on the value of vm.swappiness although there are other factors taken in

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-04-10 Thread Mel Gorman
On Wed, Apr 10, 2013 at 04:16:47PM +0900, Kamezawa Hiroyuki wrote: > (2013/04/09 20:06), Mel Gorman wrote: > > Simplistically, the anon and file LRU lists are scanned proportionally > > depending on the value of vm.swappiness although there are other factors > > taken into account by get_scan_count

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-04-10 Thread Kamezawa Hiroyuki
(2013/04/09 20:06), Mel Gorman wrote: > Simplistically, the anon and file LRU lists are scanned proportionally > depending on the value of vm.swappiness although there are other factors > taken into account by get_scan_count(). The patch "mm: vmscan: Limit > the number of pages kswapd reclaims" li

[PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-04-09 Thread Mel Gorman
Simplistically, the anon and file LRU lists are scanned proportionally depending on the value of vm.swappiness although there are other factors taken into account by get_scan_count(). The patch "mm: vmscan: Limit the number of pages kswapd reclaims" limits the number of pages kswapd reclaims but i

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-03-22 Thread Mel Gorman
On Fri, Mar 22, 2013 at 03:09:02PM -0400, Johannes Weiner wrote: > > To preserve existing behaviour, that makes sense. I'm not convinced that > > it's necessarily the best idea but altering it would be beyond the scope > > of this series and bite off more than I'm willing to chew. This actually > >

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-03-22 Thread Johannes Weiner
On Fri, Mar 22, 2013 at 06:25:56PM +, Mel Gorman wrote: > On Fri, Mar 22, 2013 at 12:53:49PM -0400, Johannes Weiner wrote: > > So would it make sense to determine the percentage scanned of the type > > that we stop scanning, then scale the original goal of the remaining > > LRUs to that percent

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-03-22 Thread Mel Gorman
On Fri, Mar 22, 2013 at 12:53:49PM -0400, Johannes Weiner wrote: > On Thu, Mar 21, 2013 at 06:02:38PM +, Mel Gorman wrote: > > On Thu, Mar 21, 2013 at 12:25:18PM -0400, Johannes Weiner wrote: > > > On Sun, Mar 17, 2013 at 01:04:08PM +, Mel Gorman wrote: > > > > Simplistically, the anon and

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-03-22 Thread Johannes Weiner
On Thu, Mar 21, 2013 at 06:02:38PM +, Mel Gorman wrote: > On Thu, Mar 21, 2013 at 12:25:18PM -0400, Johannes Weiner wrote: > > On Sun, Mar 17, 2013 at 01:04:08PM +, Mel Gorman wrote: > > > Simplistically, the anon and file LRU lists are scanned proportionally > > > depending on the value of

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-03-22 Thread Michal Hocko
On Fri 22-03-13 11:04:49, Michal Hocko wrote: > On Fri 22-03-13 08:37:04, Mel Gorman wrote: > > On Fri, Mar 22, 2013 at 08:54:27AM +0100, Michal Hocko wrote: > > > On Thu 21-03-13 15:34:42, Mel Gorman wrote: > > > > On Thu, Mar 21, 2013 at 04:07:55PM +0100, Michal Hocko wrote: > > > > > > > > diff

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-03-22 Thread Michal Hocko
On Fri 22-03-13 08:37:04, Mel Gorman wrote: > On Fri, Mar 22, 2013 at 08:54:27AM +0100, Michal Hocko wrote: > > On Thu 21-03-13 15:34:42, Mel Gorman wrote: > > > On Thu, Mar 21, 2013 at 04:07:55PM +0100, Michal Hocko wrote: > > > > > > > diff --git a/mm/vmscan.c b/mm/vmscan.c > > > > > > > index 48

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-03-22 Thread Mel Gorman
On Fri, Mar 22, 2013 at 08:54:27AM +0100, Michal Hocko wrote: > On Thu 21-03-13 15:34:42, Mel Gorman wrote: > > On Thu, Mar 21, 2013 at 04:07:55PM +0100, Michal Hocko wrote: > > > > > > diff --git a/mm/vmscan.c b/mm/vmscan.c > > > > > > index 4835a7a..182ff15 100644 > > > > > > --- a/mm/vmscan.c >

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-03-22 Thread Michal Hocko
On Thu 21-03-13 15:34:42, Mel Gorman wrote: > On Thu, Mar 21, 2013 at 04:07:55PM +0100, Michal Hocko wrote: > > > > > diff --git a/mm/vmscan.c b/mm/vmscan.c > > > > > index 4835a7a..182ff15 100644 > > > > > --- a/mm/vmscan.c > > > > > +++ b/mm/vmscan.c > > > > > @@ -1815,6 +1815,45 @@ out: > > > >

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-03-21 Thread Mel Gorman
On Thu, Mar 21, 2013 at 12:25:18PM -0400, Johannes Weiner wrote: > On Sun, Mar 17, 2013 at 01:04:08PM +, Mel Gorman wrote: > > Simplistically, the anon and file LRU lists are scanned proportionally > > depending on the value of vm.swappiness although there are other factors > > taken into accou

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-03-21 Thread Johannes Weiner
On Sun, Mar 17, 2013 at 01:04:08PM +, Mel Gorman wrote: > Simplistically, the anon and file LRU lists are scanned proportionally > depending on the value of vm.swappiness although there are other factors > taken into account by get_scan_count(). The patch "mm: vmscan: Limit > the number of pag

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-03-21 Thread Mel Gorman
On Thu, Mar 21, 2013 at 04:07:55PM +0100, Michal Hocko wrote: > > > > diff --git a/mm/vmscan.c b/mm/vmscan.c > > > > index 4835a7a..182ff15 100644 > > > > --- a/mm/vmscan.c > > > > +++ b/mm/vmscan.c > > > > @@ -1815,6 +1815,45 @@ out: > > > > } > > > > } > > > > > > > > +static void reca

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-03-21 Thread Michal Hocko
On Thu 21-03-13 14:31:15, Mel Gorman wrote: > On Thu, Mar 21, 2013 at 03:01:54PM +0100, Michal Hocko wrote: > > On Sun 17-03-13 13:04:08, Mel Gorman wrote: > > > Simplistically, the anon and file LRU lists are scanned proportionally > > > depending on the value of vm.swappiness although there are o

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-03-21 Thread Mel Gorman
On Thu, Mar 21, 2013 at 03:01:54PM +0100, Michal Hocko wrote: > On Sun 17-03-13 13:04:08, Mel Gorman wrote: > > Simplistically, the anon and file LRU lists are scanned proportionally > > depending on the value of vm.swappiness although there are other factors > > taken into account by get_scan_coun

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-03-21 Thread Michal Hocko
On Sun 17-03-13 13:04:08, Mel Gorman wrote: > Simplistically, the anon and file LRU lists are scanned proportionally > depending on the value of vm.swappiness although there are other factors > taken into account by get_scan_count(). The patch "mm: vmscan: Limit > the number of pages kswapd reclai

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-03-21 Thread Mel Gorman
On Wed, Mar 20, 2013 at 09:10:31PM -0400, Rik van Riel wrote: > On 03/17/2013 09:04 AM, Mel Gorman wrote: > >Simplistically, the anon and file LRU lists are scanned proportionally > >depending on the value of vm.swappiness although there are other factors > >taken into account by get_scan_count().

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-03-20 Thread Rik van Riel
On 03/17/2013 09:04 AM, Mel Gorman wrote: Simplistically, the anon and file LRU lists are scanned proportionally depending on the value of vm.swappiness although there are other factors taken into account by get_scan_count(). The patch "mm: vmscan: Limit the number of pages kswapd reclaims" limi

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-03-17 Thread Mel Gorman
On Sun, Mar 17, 2013 at 07:39:37AM -0700, Andi Kleen wrote: > Mel Gorman writes: > > + > > + /* > > +* For direct reclaim, reclaim the number of pages requested. Less > > +* care is taken to ensure that scanning for each LRU is properly > > +* proportional. This is unfortunate and is

Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-03-17 Thread Andi Kleen
Mel Gorman writes: > + > + /* > + * For direct reclaim, reclaim the number of pages requested. Less > + * care is taken to ensure that scanning for each LRU is properly > + * proportional. This is unfortunate and is improper aging but > + * minimises the amount of time a pr

[PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd

2013-03-17 Thread Mel Gorman
Simplistically, the anon and file LRU lists are scanned proportionally depending on the value of vm.swappiness although there are other factors taken into account by get_scan_count(). The patch "mm: vmscan: Limit the number of pages kswapd reclaims" limits the number of pages kswapd reclaims but i