[PATCH 27/27] drm/i915/gtt: Remove the spurious might_sleep before vm_free_page
Chris Wilson
chris at chris-wilson.co.uk
Thu May 23 19:55:42 UTC 2019
cpa_flush_all() (for change_page_attr) uses on_each_cpu() which while it
waits, does so with a busywait and does not sleep. It should be safe to
use from underneath our locks.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_gem_gtt.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 0e9cbe7486a8..4574ddaaa6c2 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -460,14 +460,6 @@ static void vm_free_pages_release(struct i915_address_space *vm,
static void vm_free_page(struct i915_address_space *vm, struct page *page)
{
- /*
- * On !llc, we need to change the pages back to WB. We only do so
- * in bulk, so we rarely need to change the page attributes here,
- * but doing so requires a stop_machine() from deep inside arch/x86/mm.
- * To make detection of the possible sleep more likely, use an
- * unconditional might_sleep() for everybody.
- */
- might_sleep();
spin_lock(&vm->free_pages.lock);
if (!pagevec_add(&vm->free_pages.pvec, page))
vm_free_pages_release(vm, false);
--
2.20.1
More information about the Intel-gfx-trybot
mailing list