Re: [PATCH] mm: page_alloc: simplify drain_zone_pages by using min()

2014-06-16 Thread Andrew Morton
On Mon, 16 Jun 2014 23:08:14 +0200 Michal Nazarewicz wrote: > Instead of open-coding getting minimal value of two, just use min macro. > That is why it is there for. While changing the function also change > type of batch local variable to match type of per_cpu_pages::batch > (which is int). >

Re: [PATCH] mm: page_alloc: simplify drain_zone_pages by using min()

2014-06-16 Thread David Rientjes
On Mon, 16 Jun 2014, Michal Nazarewicz wrote: > Instead of open-coding getting minimal value of two, just use min macro. > That is why it is there for. While changing the function also change > type of batch local variable to match type of per_cpu_pages::batch > (which is int). > >

[PATCH] mm: page_alloc: simplify drain_zone_pages by using min()

2014-06-16 Thread Michal Nazarewicz
Instead of open-coding getting minimal value of two, just use min macro. That is why it is there for. While changing the function also change type of batch local variable to match type of per_cpu_pages::batch (which is int). Signed-off-by: Michal Nazarewicz --- mm/page_alloc.c | 8 ++-- 1

[PATCH] mm: page_alloc: simplify drain_zone_pages by using min()

2014-06-16 Thread Michal Nazarewicz
Instead of open-coding getting minimal value of two, just use min macro. That is why it is there for. While changing the function also change type of batch local variable to match type of per_cpu_pages::batch (which is int). Signed-off-by: Michal Nazarewicz min...@mina86.com --- mm/page_alloc.c

Re: [PATCH] mm: page_alloc: simplify drain_zone_pages by using min()

2014-06-16 Thread David Rientjes
On Mon, 16 Jun 2014, Michal Nazarewicz wrote: Instead of open-coding getting minimal value of two, just use min macro. That is why it is there for. While changing the function also change type of batch local variable to match type of per_cpu_pages::batch (which is int). Signed-off-by:

Re: [PATCH] mm: page_alloc: simplify drain_zone_pages by using min()

2014-06-16 Thread Andrew Morton
On Mon, 16 Jun 2014 23:08:14 +0200 Michal Nazarewicz min...@mina86.com wrote: Instead of open-coding getting minimal value of two, just use min macro. That is why it is there for. While changing the function also change type of batch local variable to match type of per_cpu_pages::batch