]> git.baikalelectronics.ru Git - kernel.git/commit
mm/page_alloc.c: skip setting nodemask when we are in interrupt
authorMuchun Song <songmuchun@bytedance.com>
Fri, 7 Aug 2020 06:26:01 +0000 (23:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 Aug 2020 18:33:29 +0000 (11:33 -0700)
commitc16431a38f1027df47e7fb96c5bf065f38884018
tree60649694e0186f4c0db96782d8d03d3580589488
parenteeab4630b3d0cd7caf82e43b96d7b1d55a1718db
mm/page_alloc.c: skip setting nodemask when we are in interrupt

When we are in the interrupt context, it is irrelevant to the current task
context.  If we use current task's mems_allowed, we can be fair to alloc
pages in the fast path and fall back to slow path memory allocation when
the current node(which is the current task mems_allowed) does not have
enough memory to allocate.  In this case, it slows down the memory
allocation speed of interrupt context.  So we can skip setting the
nodemask to allow any node to allocate memory, so that fast path
allocation can success.

Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Cc: David Hildenbrand <david@redhat.com>
Link: http://lkml.kernel.org/r/20200706025921.53683-1-songmuchun@bytedance.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c