Re: [PATCH] mm/mmap.c: optimization of do_mmap_pgoff function

2015-06-08 Thread Rik van Riel
On 06/06/2015 05:54 AM, Piotr Kwapulinski wrote: > The simple check for zero length memory mapping may be performed > earlier. It causes that in case of zero length memory mapping some > unnecessary code is not executed at all. It does not make the code less > readable and saves some CPU cycles. >

Re: [PATCH] mm/mmap.c: optimization of do_mmap_pgoff function

2015-06-08 Thread Michal Hocko
On Sat 06-06-15 11:54:32, Piotr Kwapulinski wrote: > The simple check for zero length memory mapping may be performed > earlier. It causes that in case of zero length memory mapping some > unnecessary code is not executed at all. It does not make the code less > readable and saves some CPU cycles.

Re: [PATCH] mm/mmap.c: optimization of do_mmap_pgoff function

2015-06-08 Thread Michal Hocko
On Sat 06-06-15 11:54:32, Piotr Kwapulinski wrote: The simple check for zero length memory mapping may be performed earlier. It causes that in case of zero length memory mapping some unnecessary code is not executed at all. It does not make the code less readable and saves some CPU cycles.

Re: [PATCH] mm/mmap.c: optimization of do_mmap_pgoff function

2015-06-08 Thread Rik van Riel
On 06/06/2015 05:54 AM, Piotr Kwapulinski wrote: The simple check for zero length memory mapping may be performed earlier. It causes that in case of zero length memory mapping some unnecessary code is not executed at all. It does not make the code less readable and saves some CPU cycles.

[PATCH] mm/mmap.c: optimization of do_mmap_pgoff function

2015-06-06 Thread Piotr Kwapulinski
The simple check for zero length memory mapping may be performed earlier. It causes that in case of zero length memory mapping some unnecessary code is not executed at all. It does not make the code less readable and saves some CPU cycles. Signed-off-by: Piotr Kwapulinski --- mm/mmap.c | 6

[PATCH] mm/mmap.c: optimization of do_mmap_pgoff function

2015-06-06 Thread Piotr Kwapulinski
The simple check for zero length memory mapping may be performed earlier. It causes that in case of zero length memory mapping some unnecessary code is not executed at all. It does not make the code less readable and saves some CPU cycles. Signed-off-by: Piotr Kwapulinski