* [patch 1/8] mm, thp: remove cond_resched from __collapse_huge_page_copy
@ 2017-06-23 22:08 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2017-06-23 22:08 UTC (permalink / raw)
To: torvalds, mm-commits, akpm, rientjes, Larry.Finger, mhocko, vbabka
From: David Rientjes <rientjes@google.com>
Subject: mm, thp: remove cond_resched from __collapse_huge_page_copy
This is a partial revert of commit 338a16ba1549 ("mm, thp: copying user
pages must schedule on collapse") which added a cond_resched() to
__collapse_huge_page_copy().
On x86 with CONFIG_HIGHPTE, __collapse_huge_page_copy is called in atomic
context and thus scheduling is not possible. This is only a possible
config on arm and i386.
Although need_resched has been shown to be set for over 100 jiffies while
doing the iteration in __collapse_huge_page_copy, this is better than
doing
if (in_atomic())
cond_resched()
to cover only non-CONFIG_HIGHPTE configs.
Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1706191341550.97821@chino.kir.corp.google.com
Signed-off-by: David Rientjes <rientjes@google.com>
Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/khugepaged.c | 1 -
1 file changed, 1 deletion(-)
diff -puN mm/khugepaged.c~mm-thp-remove-cond_resched-from-__collapse_huge_page_copy mm/khugepaged.c
--- a/mm/khugepaged.c~mm-thp-remove-cond_resched-from-__collapse_huge_page_copy
+++ a/mm/khugepaged.c
@@ -652,7 +652,6 @@ static void __collapse_huge_page_copy(pt
spin_unlock(ptl);
free_page_and_swap_cache(src_page);
}
- cond_resched();
}
}
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-06-23 22:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-23 22:08 [patch 1/8] mm, thp: remove cond_resched from __collapse_huge_page_copy akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.