Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-18 Thread Johannes Weiner
On Thu, Apr 11, 2013 at 08:57:56PM +0100, Mel Gorman wrote: > If kswaps fails to make progress but continues to shrink slab then it'll > either discard all of slab or consume CPU uselessly scanning shrinkers. > This patch causes kswapd to only call the shrinkers once per priority. But the

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-18 Thread Johannes Weiner
On Thu, Apr 11, 2013 at 08:57:56PM +0100, Mel Gorman wrote: If kswaps fails to make progress but continues to shrink slab then it'll either discard all of slab or consume CPU uselessly scanning shrinkers. This patch causes kswapd to only call the shrinkers once per priority. But the priority

[PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-11 Thread Mel Gorman
If kswaps fails to make progress but continues to shrink slab then it'll either discard all of slab or consume CPU uselessly scanning shrinkers. This patch causes kswapd to only call the shrinkers once per priority. Signed-off-by: Mel Gorman Reviewed-by: Michal Hocko Acked-by: Rik van Riel ---

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-11 Thread Ric Mason
Hi Mel, On 04/11/2013 06:01 PM, Mel Gorman wrote: On Wed, Apr 10, 2013 at 02:21:42PM +0900, Joonsoo Kim wrote: @@ -2673,9 +2674,15 @@ static bool kswapd_shrink_zone(struct zone *zone, sc->nr_to_reclaim = max(SWAP_CLUSTER_MAX, high_wmark_pages(zone)); shrink_zone(zone, sc); -

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-11 Thread Mel Gorman
On Wed, Apr 10, 2013 at 02:21:42PM +0900, Joonsoo Kim wrote: > > > > @@ -2673,9 +2674,15 @@ static bool kswapd_shrink_zone(struct zone *zone, > > > > sc->nr_to_reclaim = max(SWAP_CLUSTER_MAX, > > > > high_wmark_pages(zone)); > > > > shrink_zone(zone, sc); > > > > > > > > -

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-11 Thread Mel Gorman
On Wed, Apr 10, 2013 at 11:07:34AM +1000, Dave Chinner wrote: > On Tue, Apr 09, 2013 at 12:13:59PM +0100, Mel Gorman wrote: > > On Tue, Apr 09, 2013 at 03:53:25PM +0900, Joonsoo Kim wrote: > > > > > I think that outside of zone loop is better place to run shrink_slab(), > > > because

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-11 Thread Mel Gorman
On Wed, Apr 10, 2013 at 11:07:34AM +1000, Dave Chinner wrote: On Tue, Apr 09, 2013 at 12:13:59PM +0100, Mel Gorman wrote: On Tue, Apr 09, 2013 at 03:53:25PM +0900, Joonsoo Kim wrote: I think that outside of zone loop is better place to run shrink_slab(), because shrink_slab() is not

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-11 Thread Mel Gorman
On Wed, Apr 10, 2013 at 02:21:42PM +0900, Joonsoo Kim wrote: @@ -2673,9 +2674,15 @@ static bool kswapd_shrink_zone(struct zone *zone, sc-nr_to_reclaim = max(SWAP_CLUSTER_MAX, high_wmark_pages(zone)); shrink_zone(zone, sc); -

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-11 Thread Ric Mason
Hi Mel, On 04/11/2013 06:01 PM, Mel Gorman wrote: On Wed, Apr 10, 2013 at 02:21:42PM +0900, Joonsoo Kim wrote: @@ -2673,9 +2674,15 @@ static bool kswapd_shrink_zone(struct zone *zone, sc-nr_to_reclaim = max(SWAP_CLUSTER_MAX, high_wmark_pages(zone)); shrink_zone(zone, sc); -

[PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-11 Thread Mel Gorman
If kswaps fails to make progress but continues to shrink slab then it'll either discard all of slab or consume CPU uselessly scanning shrinkers. This patch causes kswapd to only call the shrinkers once per priority. Signed-off-by: Mel Gorman mgor...@suse.de Reviewed-by: Michal Hocko

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-09 Thread Joonsoo Kim
Hello, Dave. On Wed, Apr 10, 2013 at 11:07:34AM +1000, Dave Chinner wrote: > On Tue, Apr 09, 2013 at 12:13:59PM +0100, Mel Gorman wrote: > > On Tue, Apr 09, 2013 at 03:53:25PM +0900, Joonsoo Kim wrote: > > > > > I think that outside of zone loop is better place to run shrink_slab(), > > >

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-09 Thread Joonsoo Kim
Hello, Mel. On Tue, Apr 09, 2013 at 12:13:59PM +0100, Mel Gorman wrote: > On Tue, Apr 09, 2013 at 03:53:25PM +0900, Joonsoo Kim wrote: > > Hello, Mel. > > Sorry for too late question. > > > > No need to apologise at all. > > > On Sun, Mar 17, 2013 at 01:04:14PM +, Mel Gorman wrote: > > >

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-09 Thread Dave Chinner
On Tue, Apr 09, 2013 at 12:13:59PM +0100, Mel Gorman wrote: > On Tue, Apr 09, 2013 at 03:53:25PM +0900, Joonsoo Kim wrote: > > > I think that outside of zone loop is better place to run shrink_slab(), > > because shrink_slab() is not directly related to a specific zone. > > > > This is true and

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-09 Thread Mel Gorman
On Tue, Apr 09, 2013 at 03:53:25PM +0900, Joonsoo Kim wrote: > Hello, Mel. > Sorry for too late question. > No need to apologise at all. > On Sun, Mar 17, 2013 at 01:04:14PM +, Mel Gorman wrote: > > If kswaps fails to make progress but continues to shrink slab then it'll > > either discard

[PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-09 Thread Mel Gorman
If kswaps fails to make progress but continues to shrink slab then it'll either discard all of slab or consume CPU uselessly scanning shrinkers. This patch causes kswapd to only call the shrinkers once per priority. Signed-off-by: Mel Gorman Reviewed-by: Michal Hocko Acked-by: Rik van Riel ---

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-09 Thread Simon Jeons
Hi Joonsoo, On 04/09/2013 02:53 PM, Joonsoo Kim wrote: Hello, Mel. Sorry for too late question. On Sun, Mar 17, 2013 at 01:04:14PM +, Mel Gorman wrote: If kswaps fails to make progress but continues to shrink slab then it'll either discard all of slab or consume CPU uselessly scanning

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-09 Thread Joonsoo Kim
Hello, Mel. Sorry for too late question. On Sun, Mar 17, 2013 at 01:04:14PM +, Mel Gorman wrote: > If kswaps fails to make progress but continues to shrink slab then it'll > either discard all of slab or consume CPU uselessly scanning shrinkers. > This patch causes kswapd to only call the

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-09 Thread Joonsoo Kim
Hello, Mel. Sorry for too late question. On Sun, Mar 17, 2013 at 01:04:14PM +, Mel Gorman wrote: If kswaps fails to make progress but continues to shrink slab then it'll either discard all of slab or consume CPU uselessly scanning shrinkers. This patch causes kswapd to only call the

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-09 Thread Simon Jeons
Hi Joonsoo, On 04/09/2013 02:53 PM, Joonsoo Kim wrote: Hello, Mel. Sorry for too late question. On Sun, Mar 17, 2013 at 01:04:14PM +, Mel Gorman wrote: If kswaps fails to make progress but continues to shrink slab then it'll either discard all of slab or consume CPU uselessly scanning

[PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-09 Thread Mel Gorman
If kswaps fails to make progress but continues to shrink slab then it'll either discard all of slab or consume CPU uselessly scanning shrinkers. This patch causes kswapd to only call the shrinkers once per priority. Signed-off-by: Mel Gorman mgor...@suse.de Reviewed-by: Michal Hocko

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-09 Thread Mel Gorman
On Tue, Apr 09, 2013 at 03:53:25PM +0900, Joonsoo Kim wrote: Hello, Mel. Sorry for too late question. No need to apologise at all. On Sun, Mar 17, 2013 at 01:04:14PM +, Mel Gorman wrote: If kswaps fails to make progress but continues to shrink slab then it'll either discard all of

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-09 Thread Dave Chinner
On Tue, Apr 09, 2013 at 12:13:59PM +0100, Mel Gorman wrote: On Tue, Apr 09, 2013 at 03:53:25PM +0900, Joonsoo Kim wrote: I think that outside of zone loop is better place to run shrink_slab(), because shrink_slab() is not directly related to a specific zone. This is true and has been

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-09 Thread Joonsoo Kim
Hello, Mel. On Tue, Apr 09, 2013 at 12:13:59PM +0100, Mel Gorman wrote: On Tue, Apr 09, 2013 at 03:53:25PM +0900, Joonsoo Kim wrote: Hello, Mel. Sorry for too late question. No need to apologise at all. On Sun, Mar 17, 2013 at 01:04:14PM +, Mel Gorman wrote: If kswaps fails

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-04-09 Thread Joonsoo Kim
Hello, Dave. On Wed, Apr 10, 2013 at 11:07:34AM +1000, Dave Chinner wrote: On Tue, Apr 09, 2013 at 12:13:59PM +0100, Mel Gorman wrote: On Tue, Apr 09, 2013 at 03:53:25PM +0900, Joonsoo Kim wrote: I think that outside of zone loop is better place to run shrink_slab(), because

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-03-21 Thread Rik van Riel
On 03/17/2013 09:04 AM, Mel Gorman wrote: If kswaps fails to make progress but continues to shrink slab then it'll either discard all of slab or consume CPU uselessly scanning shrinkers. This patch causes kswapd to only call the shrinkers once per priority. Signed-off-by: Mel Gorman

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-03-21 Thread Michal Hocko
On Sun 17-03-13 13:04:14, Mel Gorman wrote: > If kswaps fails to make progress but continues to shrink slab then it'll > either discard all of slab or consume CPU uselessly scanning shrinkers. > This patch causes kswapd to only call the shrinkers once per priority. > > Signed-off-by: Mel Gorman

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-03-21 Thread Michal Hocko
On Sun 17-03-13 13:04:14, Mel Gorman wrote: If kswaps fails to make progress but continues to shrink slab then it'll either discard all of slab or consume CPU uselessly scanning shrinkers. This patch causes kswapd to only call the shrinkers once per priority. Signed-off-by: Mel Gorman

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-03-21 Thread Rik van Riel
On 03/17/2013 09:04 AM, Mel Gorman wrote: If kswaps fails to make progress but continues to shrink slab then it'll either discard all of slab or consume CPU uselessly scanning shrinkers. This patch causes kswapd to only call the shrinkers once per priority. Signed-off-by: Mel Gorman

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-03-17 Thread Andi Kleen
Mel Gorman writes: > If kswaps fails to make progress but continues to shrink slab then it'll > either discard all of slab or consume CPU uselessly scanning shrinkers. > This patch causes kswapd to only call the shrinkers once per priority. Great. This was too aggressive for a long time.

[PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-03-17 Thread Mel Gorman
If kswaps fails to make progress but continues to shrink slab then it'll either discard all of slab or consume CPU uselessly scanning shrinkers. This patch causes kswapd to only call the shrinkers once per priority. Signed-off-by: Mel Gorman --- mm/vmscan.c | 28 +--- 1

[PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-03-17 Thread Mel Gorman
If kswaps fails to make progress but continues to shrink slab then it'll either discard all of slab or consume CPU uselessly scanning shrinkers. This patch causes kswapd to only call the shrinkers once per priority. Signed-off-by: Mel Gorman mgor...@suse.de --- mm/vmscan.c | 28

Re: [PATCH 08/10] mm: vmscan: Have kswapd shrink slab only once per priority

2013-03-17 Thread Andi Kleen
Mel Gorman mgor...@suse.de writes: If kswaps fails to make progress but continues to shrink slab then it'll either discard all of slab or consume CPU uselessly scanning shrinkers. This patch causes kswapd to only call the shrinkers once per priority. Great. This was too aggressive for a long