mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [merged] mm-page_alloc-skip-setting-nodemask-when-we-are-in-interrupt.patch removed from -mm tree
@ 2020-08-10  2:40 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2020-08-10  2:40 UTC (permalink / raw)
  To: david, mm-commits, penberg, songmuchun


The patch titled
     Subject: mm/page_alloc.c: skip setting nodemask when we are in interrupt
has been removed from the -mm tree.  Its filename was
     mm-page_alloc-skip-setting-nodemask-when-we-are-in-interrupt.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Muchun Song <songmuchun@bytedance.com>
Subject: 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.

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

 mm/page_alloc.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/mm/page_alloc.c~mm-page_alloc-skip-setting-nodemask-when-we-are-in-interrupt
+++ a/mm/page_alloc.c
@@ -4788,7 +4788,11 @@ static inline bool prepare_alloc_pages(g
 
 	if (cpusets_enabled()) {
 		*alloc_mask |= __GFP_HARDWALL;
-		if (!ac->nodemask)
+		/*
+		 * When we are in the interrupt context, it is irrelevant
+		 * to the current task context. It means that any node ok.
+		 */
+		if (!in_interrupt() && !ac->nodemask)
 			ac->nodemask = &cpuset_current_mems_allowed;
 		else
 			*alloc_flags |= ALLOC_CPUSET;
_

Patches currently in -mm which might be from songmuchun@bytedance.com are

mm-hugetlb-add-mempolicy-check-in-the-reservation-routine.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-10  2:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-10  2:40 [merged] mm-page_alloc-skip-setting-nodemask-when-we-are-in-interrupt.patch removed from -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).