diff options
author | Joonsoo Kim <iamjoonsoo.kim@lge.com> | 2013-09-11 23:21:26 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-12 00:57:29 +0200 |
commit | e66f09725771ac5b1b868d6b19eba84e30ffad88 (patch) | |
tree | 82cd7bb01c1253efa6c13986882fab63a50201e6 /mm/memory.c | |
parent | mm/mempolicy: return NULL if node is NUMA_NO_NODE in get_task_policy (diff) | |
download | linux-e66f09725771ac5b1b868d6b19eba84e30ffad88.tar.xz linux-e66f09725771ac5b1b868d6b19eba84e30ffad88.zip |
mm, page_alloc: add unlikely macro to help compiler optimization
We rarely allocate a page with ALLOC_NO_WATERMARKS and it is used in slow
path. For helping compiler optimization, add unlikely macro to
ALLOC_NO_WATERMARKS checking.
This patch doesn't have any effect now, because gcc already optimize this
properly. But we cannot assume that gcc always does right and nobody
re-evaluate if gcc do proper optimization with their change, for example,
it is not optimized properly on v3.10. So adding compiler hint here is
reasonable.
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memory.c')
0 files changed, 0 insertions, 0 deletions