]> git.baikalelectronics.ru Git - kernel.git/commit
mm/compaction.c: micro-optimization remove unnecessary branch
authorMateusz Nosek <mateusznosek0@gmail.com>
Tue, 13 Oct 2020 23:56:58 +0000 (16:56 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 14 Oct 2020 01:38:34 +0000 (18:38 -0700)
commit633958503f333e5f97952023c3eb741cca86580b
treec6765b6baf6b695d34245bd47d0fd9df8642403f
parent10b4efb151cc6bd237e92a52513168cc4ac4c100
mm/compaction.c: micro-optimization remove unnecessary branch

The same code can work both for 'zone->compact_considered > defer_limit'
and 'zone->compact_considered >= defer_limit'.  In the latter there is one
branch less which is more effective considering performance.

Signed-off-by: Mateusz Nosek <mateusznosek0@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Mel Gorman <mgorman@suse.de>
Cc: David Rientjes <rientjes@google.com>
Link: https://lkml.kernel.org/r/20200913190448.28649-1-mateusznosek0@gmail.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/compaction.c