Home
last modified time | relevance | path

Searched hist:c568da282bbc8f09c4b49201177fa259fe184c47 (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/mm/
H A Dvmalloc.cdiff c568da282bbc8f09c4b49201177fa259fe184c47 Wed Sep 06 18:24:09 CDT 2017 Wei Yang <richard.weiyang@gmail.com> mm/vmalloc.c: halve the number of comparisons performed in pcpu_get_vm_areas()

In pcpu_get_vm_areas(), it checks each range is not overlapped. To make
sure it is, only (N^2)/2 comparison is necessary, while current code
does N^2 times. By starting from the next range, it achieves the goal
and the continue could be removed.

Also,

- the overlap check of two ranges could be done with one clause

- one typo in comment is fixed.

Link: http://lkml.kernel.org/r/20170803063822.48702-1-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>