Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: 290271d ("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]>
- Loading branch information