Re: [Intel-gfx] [PATCH] [RFC] mm/shrinker: Add a shrinker flag to always shrink a bit

2013-09-19 Thread Knut Petersen
On 19.09.2013 08:57, Daniel Vetter wrote: On Wed, Sep 18, 2013 at 10:38 PM, Dave Chinner wrote: No, that's wrong. ->count_objects should never ass SHRINK_STOP. Indeed, it should always return a count of objects in the cache, regardless of the context. SHRINK_STOP is for ->scan_objects to tell

Re: [Intel-gfx] [PATCH] [RFC] mm/shrinker: Add a shrinker flag to always shrink a bit

2013-09-19 Thread Dave Chinner
On Thu, Sep 19, 2013 at 08:57:04AM +0200, Daniel Vetter wrote: > On Wed, Sep 18, 2013 at 10:38 PM, Dave Chinner wrote: > > No, that's wrong. ->count_objects should never ass SHRINK_STOP. > > Indeed, it should always return a count of objects in the cache, > > regardless of the context. > > > >

Re: [Intel-gfx] [PATCH] [RFC] mm/shrinker: Add a shrinker flag to always shrink a bit

2013-09-19 Thread Daniel Vetter
On Wed, Sep 18, 2013 at 10:38 PM, Dave Chinner wrote: > No, that's wrong. ->count_objects should never ass SHRINK_STOP. > Indeed, it should always return a count of objects in the cache, > regardless of the context. > > SHRINK_STOP is for ->scan_objects to tell the shrinker it can make > any

Re: [Intel-gfx] [PATCH] [RFC] mm/shrinker: Add a shrinker flag to always shrink a bit

2013-09-19 Thread Daniel Vetter
On Wed, Sep 18, 2013 at 10:38 PM, Dave Chinner da...@fromorbit.com wrote: No, that's wrong. -count_objects should never ass SHRINK_STOP. Indeed, it should always return a count of objects in the cache, regardless of the context. SHRINK_STOP is for -scan_objects to tell the shrinker it can

Re: [Intel-gfx] [PATCH] [RFC] mm/shrinker: Add a shrinker flag to always shrink a bit

2013-09-19 Thread Dave Chinner
On Thu, Sep 19, 2013 at 08:57:04AM +0200, Daniel Vetter wrote: On Wed, Sep 18, 2013 at 10:38 PM, Dave Chinner da...@fromorbit.com wrote: No, that's wrong. -count_objects should never ass SHRINK_STOP. Indeed, it should always return a count of objects in the cache, regardless of the context.

Re: [Intel-gfx] [PATCH] [RFC] mm/shrinker: Add a shrinker flag to always shrink a bit

2013-09-19 Thread Knut Petersen
On 19.09.2013 08:57, Daniel Vetter wrote: On Wed, Sep 18, 2013 at 10:38 PM, Dave Chinner da...@fromorbit.com wrote: No, that's wrong. -count_objects should never ass SHRINK_STOP. Indeed, it should always return a count of objects in the cache, regardless of the context. SHRINK_STOP is for

Re: [Intel-gfx] [PATCH] [RFC] mm/shrinker: Add a shrinker flag to always shrink a bit

2013-09-18 Thread Dave Chinner
[my keyboard my be on the fritz - it's not typing what I'm thinking...] On Thu, Sep 19, 2013 at 06:38:22AM +1000, Dave Chinner wrote: > On Wed, Sep 18, 2013 at 12:38:23PM +0200, Knut Petersen wrote: > > On 18.09.2013 11:10, Daniel Vetter wrote: > > > > Just now I prepared a patch changing the

Re: [Intel-gfx] [PATCH] [RFC] mm/shrinker: Add a shrinker flag to always shrink a bit

2013-09-18 Thread Dave Chinner
On Wed, Sep 18, 2013 at 12:38:23PM +0200, Knut Petersen wrote: > On 18.09.2013 11:10, Daniel Vetter wrote: > > Just now I prepared a patch changing the same function in vmscan.c > >Also, this needs to be rebased to the new shrinker api in 3.12, I > >simply haven't rolled my trees forward yet. >

Re: [Intel-gfx] [PATCH] [RFC] mm/shrinker: Add a shrinker flag to always shrink a bit

2013-09-18 Thread Knut Petersen
Looking at the patch which introduced these error message for you, which changed the ->count_objects return value from 0 to SHRINK_STOP your patch below to treat 0 and SHRINK_STOP equally simply reverts the functional change. Yes, for i915* it de facto restores the old behaviour. I don't

Re: [Intel-gfx] [PATCH] [RFC] mm/shrinker: Add a shrinker flag to always shrink a bit

2013-09-18 Thread Daniel Vetter
On Wed, Sep 18, 2013 at 12:38:23PM +0200, Knut Petersen wrote: > On 18.09.2013 11:10, Daniel Vetter wrote: > > Just now I prepared a patch changing the same function in vmscan.c > >Also, this needs to be rebased to the new shrinker api in 3.12, I > >simply haven't rolled my trees forward yet. >

Re: [Intel-gfx] [PATCH] [RFC] mm/shrinker: Add a shrinker flag to always shrink a bit

2013-09-18 Thread Knut Petersen
On 18.09.2013 11:10, Daniel Vetter wrote: Just now I prepared a patch changing the same function in vmscan.c Also, this needs to be rebased to the new shrinker api in 3.12, I simply haven't rolled my trees forward yet. Well, you should. Since commit 81e49f shrinker->count_objects might be

Re: [Intel-gfx] [PATCH] [RFC] mm/shrinker: Add a shrinker flag to always shrink a bit

2013-09-18 Thread Knut Petersen
On 18.09.2013 11:10, Daniel Vetter wrote: Just now I prepared a patch changing the same function in vmscan.c Also, this needs to be rebased to the new shrinker api in 3.12, I simply haven't rolled my trees forward yet. Well, you should. Since commit 81e49f shrinker-count_objects might be set

Re: [Intel-gfx] [PATCH] [RFC] mm/shrinker: Add a shrinker flag to always shrink a bit

2013-09-18 Thread Daniel Vetter
On Wed, Sep 18, 2013 at 12:38:23PM +0200, Knut Petersen wrote: On 18.09.2013 11:10, Daniel Vetter wrote: Just now I prepared a patch changing the same function in vmscan.c Also, this needs to be rebased to the new shrinker api in 3.12, I simply haven't rolled my trees forward yet. Well,

Re: [Intel-gfx] [PATCH] [RFC] mm/shrinker: Add a shrinker flag to always shrink a bit

2013-09-18 Thread Knut Petersen
Looking at the patch which introduced these error message for you, which changed the -count_objects return value from 0 to SHRINK_STOP your patch below to treat 0 and SHRINK_STOP equally simply reverts the functional change. Yes, for i915* it de facto restores the old behaviour. I don't

Re: [Intel-gfx] [PATCH] [RFC] mm/shrinker: Add a shrinker flag to always shrink a bit

2013-09-18 Thread Dave Chinner
On Wed, Sep 18, 2013 at 12:38:23PM +0200, Knut Petersen wrote: On 18.09.2013 11:10, Daniel Vetter wrote: Just now I prepared a patch changing the same function in vmscan.c Also, this needs to be rebased to the new shrinker api in 3.12, I simply haven't rolled my trees forward yet. Well,

Re: [Intel-gfx] [PATCH] [RFC] mm/shrinker: Add a shrinker flag to always shrink a bit

2013-09-18 Thread Dave Chinner
[my keyboard my be on the fritz - it's not typing what I'm thinking...] On Thu, Sep 19, 2013 at 06:38:22AM +1000, Dave Chinner wrote: On Wed, Sep 18, 2013 at 12:38:23PM +0200, Knut Petersen wrote: On 18.09.2013 11:10, Daniel Vetter wrote: Just now I prepared a patch changing the same