diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-12-21 14:49:17 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-12-30 12:10:38 +0000 |
commit | a9e395a4ab795e6f96961ba6d0620f91b2dce9a0 (patch) | |
tree | c573068208135f10652ae61b7ef1c5a2d38866d3 /drivers/gpu/drm | |
parent | a3d9382bd439e7be1858abc3d5f014dd55913448 (diff) | |
download | linux-stable-a9e395a4ab795e6f96961ba6d0620f91b2dce9a0.tar.gz linux-stable-a9e395a4ab795e6f96961ba6d0620f91b2dce9a0.tar.bz2 linux-stable-a9e395a4ab795e6f96961ba6d0620f91b2dce9a0.zip |
drn/i915: Break up long i915_buddy_free_list() with a cond_resched()
In the selftests, we may feed very long lists of blocks to be freed on
culmination of the tests. This coupled with kasan and other
malloc-tracing can make the kmem_cache_free() operation time consuming,
and doing many of those trigger soft lockup warnings. Break the list up
with a cond_resched().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191221144917.1040662-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/i915_buddy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_buddy.c b/drivers/gpu/drm/i915/i915_buddy.c index e9d4200ce3bc..66883af64ca1 100644 --- a/drivers/gpu/drm/i915/i915_buddy.c +++ b/drivers/gpu/drm/i915/i915_buddy.c @@ -262,8 +262,10 @@ void i915_buddy_free_list(struct i915_buddy_mm *mm, struct list_head *objects) { struct i915_buddy_block *block, *on; - list_for_each_entry_safe(block, on, objects, link) + list_for_each_entry_safe(block, on, objects, link) { i915_buddy_free(mm, block); + cond_resched(); + } INIT_LIST_HEAD(objects); } |