diff options
author | David Rientjes <rientjes@google.com> | 2017-06-23 15:08:38 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-06-23 16:15:55 -0700 |
commit | c891d9f6bf2a78c9c657656872a60807820db4c8 (patch) | |
tree | ce2dac47780133fee1e18579af6070add62319b5 | |
parent | a38371cba67539ce6a5d5324db34bc2ddaf66cc1 (diff) | |
download | op-kernel-dev-c891d9f6bf2a78c9c657656872a60807820db4c8.zip op-kernel-dev-c891d9f6bf2a78c9c657656872a60807820db4c8.tar.gz |
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | mm/khugepaged.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 945fd1c..df4ebdb 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -652,7 +652,6 @@ static void __collapse_huge_page_copy(pte_t *pte, struct page *page, spin_unlock(ptl); free_page_and_swap_cache(src_page); } - cond_resched(); } } |