Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-23 Thread Mel Gorman
On Tue, Jun 17, 2014 at 12:55:02PM +0800, Chen Yucong wrote: > Via https://lkml.org/lkml/2013/4/10/897, we can know that the relative design > idea is to keep > > scan_target[anon] : scan_target[file] > == really_scanned_num[anon] : really_scanned_num[file] > > But we can find the

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-23 Thread Mel Gorman
On Thu, Jun 19, 2014 at 01:13:22PM -0700, Andrew Morton wrote: > On Thu, 19 Jun 2014 10:02:39 +0900 Minchan Kim wrote: > > > > > @@ -2057,8 +2057,7 @@ out: > > > > static void shrink_lruvec(struct lruvec *lruvec, struct scan_control > > > > *sc) > > > > { > > > > unsigned long

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-23 Thread Mel Gorman
On Thu, Jun 19, 2014 at 01:13:22PM -0700, Andrew Morton wrote: On Thu, 19 Jun 2014 10:02:39 +0900 Minchan Kim minc...@kernel.org wrote: @@ -2057,8 +2057,7 @@ out: static void shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc) { unsigned long

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-23 Thread Mel Gorman
On Tue, Jun 17, 2014 at 12:55:02PM +0800, Chen Yucong wrote: Via https://lkml.org/lkml/2013/4/10/897, we can know that the relative design idea is to keep scan_target[anon] : scan_target[file] == really_scanned_num[anon] : really_scanned_num[file] But we can find the following

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-19 Thread Andrew Morton
On Thu, 19 Jun 2014 10:02:39 +0900 Minchan Kim wrote: > > > @@ -2057,8 +2057,7 @@ out: > > > static void shrink_lruvec(struct lruvec *lruvec, struct scan_control > > > *sc) > > > { > > > unsigned long nr[NR_LRU_LISTS]; > > > - unsigned long targets[NR_LRU_LISTS]; > > > -

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-19 Thread Andrew Morton
On Thu, 19 Jun 2014 10:02:39 +0900 Minchan Kim minc...@kernel.org wrote: @@ -2057,8 +2057,7 @@ out: static void shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc) { unsigned long nr[NR_LRU_LISTS]; - unsigned long targets[NR_LRU_LISTS]; -

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-18 Thread Minchan Kim
Hello Andrew, On Wed, Jun 18, 2014 at 05:40:01PM -0700, Andrew Morton wrote: > On Thu, 19 Jun 2014 08:04:32 +0800 Chen Yucong wrote: > > > On Wed, 2014-06-18 at 15:27 -0700, Andrew Morton wrote: > > > On Tue, 17 Jun 2014 12:55:02 +0800 Chen Yucong wrote: > > > > > > > diff --git a/mm/vmscan.c

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-18 Thread Andrew Morton
On Thu, 19 Jun 2014 08:04:32 +0800 Chen Yucong wrote: > On Wed, 2014-06-18 at 15:27 -0700, Andrew Morton wrote: > > On Tue, 17 Jun 2014 12:55:02 +0800 Chen Yucong wrote: > > > > > diff --git a/mm/vmscan.c b/mm/vmscan.c > > > index a8ffe4e..2c35e34 100644 > > > --- a/mm/vmscan.c > > > +++

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-18 Thread Chen Yucong
On Wed, 2014-06-18 at 15:27 -0700, Andrew Morton wrote: > On Tue, 17 Jun 2014 12:55:02 +0800 Chen Yucong wrote: > > > diff --git a/mm/vmscan.c b/mm/vmscan.c > > index a8ffe4e..2c35e34 100644 > > --- a/mm/vmscan.c > > +++ b/mm/vmscan.c > > @@ -2087,8 +2086,8 @@ static void shrink_lruvec(struct

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-18 Thread Andrew Morton
On Tue, 17 Jun 2014 12:55:02 +0800 Chen Yucong wrote: > Via https://lkml.org/lkml/2013/4/10/897, we can know that the relative design > idea is to keep > > scan_target[anon] : scan_target[file] > == really_scanned_num[anon] : really_scanned_num[file] > > But we can find the

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-18 Thread Jerome Marchand
On 06/18/2014 11:08 AM, Chen Yucong wrote: > On Wed, 2014-06-18 at 11:00 +0200, Jerome Marchand wrote: >>> if (!nr_file || !nr_anon) >>> break; >>> >>> - if (nr_file > nr_anon) { >>> - unsigned long scan_target = >>

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-18 Thread Chen Yucong
On Wed, 2014-06-18 at 11:00 +0200, Jerome Marchand wrote: > > if (!nr_file || !nr_anon) > > break; > > > > - if (nr_file > nr_anon) { > > - unsigned long scan_target = > targets[LRU_INACTIVE_ANON] + > > > -

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-18 Thread Jerome Marchand
On 06/17/2014 06:55 AM, Chen Yucong wrote: > Via https://lkml.org/lkml/2013/4/10/897, we can know that the relative design > idea is to keep > > scan_target[anon] : scan_target[file] > == really_scanned_num[anon] : really_scanned_num[file] > > But we can find the following snippet in

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-18 Thread Jerome Marchand
On 06/17/2014 06:55 AM, Chen Yucong wrote: Via https://lkml.org/lkml/2013/4/10/897, we can know that the relative design idea is to keep scan_target[anon] : scan_target[file] == really_scanned_num[anon] : really_scanned_num[file] But we can find the following snippet in

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-18 Thread Chen Yucong
On Wed, 2014-06-18 at 11:00 +0200, Jerome Marchand wrote: if (!nr_file || !nr_anon) break; - if (nr_file nr_anon) { - unsigned long scan_target = targets[LRU_INACTIVE_ANON] + -

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-18 Thread Jerome Marchand
On 06/18/2014 11:08 AM, Chen Yucong wrote: On Wed, 2014-06-18 at 11:00 +0200, Jerome Marchand wrote: if (!nr_file || !nr_anon) break; - if (nr_file nr_anon) { - unsigned long scan_target = targets[LRU_INACTIVE_ANON] +

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-18 Thread Andrew Morton
On Tue, 17 Jun 2014 12:55:02 +0800 Chen Yucong sla...@gmail.com wrote: Via https://lkml.org/lkml/2013/4/10/897, we can know that the relative design idea is to keep scan_target[anon] : scan_target[file] == really_scanned_num[anon] : really_scanned_num[file] But we can find

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-18 Thread Chen Yucong
On Wed, 2014-06-18 at 15:27 -0700, Andrew Morton wrote: On Tue, 17 Jun 2014 12:55:02 +0800 Chen Yucong sla...@gmail.com wrote: diff --git a/mm/vmscan.c b/mm/vmscan.c index a8ffe4e..2c35e34 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2087,8 +2086,8 @@ static void

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-18 Thread Andrew Morton
On Thu, 19 Jun 2014 08:04:32 +0800 Chen Yucong sla...@gmail.com wrote: On Wed, 2014-06-18 at 15:27 -0700, Andrew Morton wrote: On Tue, 17 Jun 2014 12:55:02 +0800 Chen Yucong sla...@gmail.com wrote: diff --git a/mm/vmscan.c b/mm/vmscan.c index a8ffe4e..2c35e34 100644 ---

Re: [PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-18 Thread Minchan Kim
Hello Andrew, On Wed, Jun 18, 2014 at 05:40:01PM -0700, Andrew Morton wrote: On Thu, 19 Jun 2014 08:04:32 +0800 Chen Yucong sla...@gmail.com wrote: On Wed, 2014-06-18 at 15:27 -0700, Andrew Morton wrote: On Tue, 17 Jun 2014 12:55:02 +0800 Chen Yucong sla...@gmail.com wrote: diff

[PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-16 Thread Chen Yucong
Via https://lkml.org/lkml/2013/4/10/897, we can know that the relative design idea is to keep scan_target[anon] : scan_target[file] == really_scanned_num[anon] : really_scanned_num[file] But we can find the following snippet in shrink_lruvec(): if (nr_file > nr_anon) {

[PATCH] mm/vmscan.c: fix an implementation flaw in proportional scanning

2014-06-16 Thread Chen Yucong
Via https://lkml.org/lkml/2013/4/10/897, we can know that the relative design idea is to keep scan_target[anon] : scan_target[file] == really_scanned_num[anon] : really_scanned_num[file] But we can find the following snippet in shrink_lruvec(): if (nr_file nr_anon) {