Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] HAX mm: Prevent stalling for lock_page in deferred_split_scan
@ 2017-12-13 15:47 Chris Wilson
  2017-12-13 16:24 ` ✓ Fi.CI.BAT: success for " Patchwork
  2017-12-13 18:29 ` ✓ Fi.CI.IGT: " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2017-12-13 15:47 UTC (permalink / raw)
  To: intel-gfx

References: https://bugs.freedesktop.org/show_bug.cgi?id=104009

Suggest-Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Suggest-Cc: Vlastimil Babka <vbabka@suse.cz>
Suggest-Cc: Jerome Marchand <jmarchan@redhat.com>
Suggest-Cc: Andrea Arcangeli <aarcange@redhat.com>
Suggest-Cc: Hugh Dickins <hughd@google.com>
Suggest-Cc: Dave Hansen <dave.hansen@intel.com>
Suggest-Cc: Mel Gorman <mgorman@suse.de>
Suggest-Cc: Rik van Riel <riel@redhat.com>
Suggest-Cc: Johannes Weiner <hannes@cmpxchg.org>
Suggest-Cc: Michal Hocko <mhocko@suse.cz>
Suggest-Cc: Christoph Lameter <cl@linux.com>
Suggest-Cc: David Rientjes <rientjes@google.com>
Suggest-Cc: Andrew Morton <akpm@linux-foundation.org>
---
 mm/huge_memory.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 2f2f5e774902..e555a90ad079 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -2791,10 +2791,13 @@ static unsigned long deferred_split_scan(struct shrinker *shrink,
 
 	list_for_each_safe(pos, next, &list) {
 		page = list_entry((void *)pos, struct page, mapping);
-		lock_page(page);
+		if (!trylock_page(page))
+			continue;
+
 		/* split_huge_page() removes page from list on success */
 		if (!split_huge_page(page))
 			split++;
+
 		unlock_page(page);
 		put_page(page);
 	}
-- 
2.15.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-13 18:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-13 15:47 [PATCH] HAX mm: Prevent stalling for lock_page in deferred_split_scan Chris Wilson
2017-12-13 16:24 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-12-13 18:29 ` ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox