]> Git Repo - linux.git/commit
drm/i915/shrinker: Wrap need_resched() inside preempt-disable
authorChris Wilson <[email protected]>
Fri, 4 Aug 2017 10:41:35 +0000 (11:41 +0100)
committerJani Nikula <[email protected]>
Mon, 7 Aug 2017 10:38:56 +0000 (13:38 +0300)
commitcd82f37a9ddaaafb33d8bc3f44857edbad5d52bf
treefe4ac7530bfd8cde14873c3844aa29f04890e4f0
parentb5fa57ddc4a2492441a1391f07d5c8a282271249
drm/i915/shrinker: Wrap need_resched() inside preempt-disable

In order for us to successfully detect the end of a timeslice,
preemption must be disabled. Otherwise, inside the loop we may be
preempted many times without our noticing, and each time our timeslice
will be reset, invalidating need_resched()

Reported-by: Joonas Lahtinen <[email protected]>
Reported-by: Tomi Sarvela <[email protected]>
Fixes: 290271de34f6 ("drm/i915: Spin for struct_mutex inside shrinker")
Signed-off-by: Chris Wilson <[email protected]>
Cc: Mika Kuoppala <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: <[email protected]> # v4.13-rc1+
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Tested-by: Joonas Lahtinen <[email protected]>
Reviewed-by: Joonas Lahtinen <[email protected]>
(cherry picked from commit 6cb0c6ad9e07f2c7971c4e8e0d9b7ceba151a925)
Signed-off-by: Jani Nikula <[email protected]>
drivers/gpu/drm/i915/i915_gem_shrinker.c
This page took 0.038579 seconds and 4 git commands to generate.