Re: [PATCH] mm: vmscan: handle any negative return value from scan_objects

2013-05-17 Thread Oskar Andero
On 08:33 Fri 17 May , Dave Chinner wrote: > On Thu, May 16, 2013 at 02:27:52PM +0200, Oskar Andero wrote: > > On 13:52 Thu 16 May , Dave Chinner wrote: > > > On Thu, May 16, 2013 at 10:42:16AM +0200, Oskar Andero wrote: > > > > The shrinkers must return -1 to indicate that it is busy. Inste

Re: [PATCH] mm: vmscan: handle any negative return value from scan_objects

2013-05-16 Thread Dave Chinner
On Thu, May 16, 2013 at 02:27:52PM +0200, Oskar Andero wrote: > On 13:52 Thu 16 May , Dave Chinner wrote: > > On Thu, May 16, 2013 at 10:42:16AM +0200, Oskar Andero wrote: > > > The shrinkers must return -1 to indicate that it is busy. Instead, treat > > > any negative value as busy. > > > > W

Re: [PATCH] mm: vmscan: handle any negative return value from scan_objects

2013-05-16 Thread Oskar Andero
On 13:52 Thu 16 May , Dave Chinner wrote: > On Thu, May 16, 2013 at 10:42:16AM +0200, Oskar Andero wrote: > > The shrinkers must return -1 to indicate that it is busy. Instead, treat > > any negative value as busy. > > Why? The API defines return condition for aborting a scan and gives > a spe

Re: [PATCH] mm: vmscan: handle any negative return value from scan_objects

2013-05-16 Thread Dave Chinner
On Thu, May 16, 2013 at 10:42:16AM +0200, Oskar Andero wrote: > The shrinkers must return -1 to indicate that it is busy. Instead, treat > any negative value as busy. Why? The API defines return condition for aborting a scan and gives a specific value for doing that. i.e. explain why should change

[PATCH] mm: vmscan: handle any negative return value from scan_objects

2013-05-16 Thread Oskar Andero
The shrinkers must return -1 to indicate that it is busy. Instead, treat any negative value as busy. This fixes a potential bug if scan_objects returns a negative other than -1. Cc: Glauber Costa Cc: Dave Chinner Cc: Andrew Morton Cc: Hugh Dickins Cc: Greg Kroah-Hartman Signed-off-by: Oskar A