summary refs log tree commit diff
path: root/lib/ioremap.c
diff options
context:
space:
mode:
authorVlastimil Babka <vbabka@suse.cz>2017-02-24 14:56:50 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-24 17:46:54 -0800
commitdf76cee6bbeb2ed036f1622f63a99c28cecf6b30 (patch)
tree9a36846301c78c960d569823d468e5b84556e30c /lib/ioremap.c
parenta09759acaacf6cf738e1bc6c66d41485c87fd371 (diff)
downloadlinux-df76cee6bbeb2ed036f1622f63a99c28cecf6b30.tar.gz
mm, page_alloc: remove redundant checks from alloc fastpath
The allocation fast path contains two similar checks for zoneref->zone
being NULL, where zoneref points either to the first zone in the
zonelist, or to the preferred zone.  These can be NULL either due to
empty zonelist, or no zone being compatible with given nodemask or
task's cpuset.

These checks are unnecessary, because the zonelist walks in
first_zones_zonelist() and get_page_from_freelist() handle a NULL
starting zoneref->zone or preferred_zoneref->zone safely.  It's safe to
fallback to __alloc_pages_slowpath() where we also have the check early
enough.

Link: http://lkml.kernel.org/r/20170124150511.5710-1-vbabka@suse.cz
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/ioremap.c')
0 files changed, 0 insertions, 0 deletions