Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromtorvalds/linux

Commitfa41b90

Browse files
kiryltorvalds
authored andcommitted
mm/thp: do not wait for lock_page() in deferred_split_scan()
deferred_split_scan() gets called from reclaim path. Waiting for pagelock may lead to deadlock there.Replace lock_page() with trylock_page() and skip the page if we failedto lock it. We will get to the page on the next scan.Link:http://lkml.kernel.org/r/20180315150747.31945-1-kirill.shutemov@linux.intel.comFixes:9a98225 ("thp: introduce deferred_split_huge_page()")Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>Acked-by: Michal Hocko <mhocko@suse.com>Cc: <stable@vger.kernel.org>Signed-off-by: Andrew Morton <akpm@linux-foundation.org>Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parentfece202 commitfa41b90

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎mm/huge_memory.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2783,11 +2783,13 @@ static unsigned long deferred_split_scan(struct shrinker *shrink,
27832783

27842784
list_for_each_safe(pos,next,&list) {
27852785
page=list_entry((void*)pos,structpage,mapping);
2786-
lock_page(page);
2786+
if (!trylock_page(page))
2787+
gotonext;
27872788
/* split_huge_page() removes page from list on success */
27882789
if (!split_huge_page(page))
27892790
split++;
27902791
unlock_page(page);
2792+
next:
27912793
put_page(page);
27922794
}
27932795

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp