[Intel-gfx] [PATCH] drm/i915/shrinker: Wrap need_resched() inside preempt-disable
Joonas Lahtinen
joonas.lahtinen at linux.intel.com
Fri Aug 4 11:52:51 UTC 2017
On pe, 2017-08-04 at 11:41 +0100, Chris Wilson wrote:
> 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 <joonas.lahtinen at linux.intel.com>
> Reported-by: Tomi Sarvela <tomi.p.sarvela at intel.com>
> Fixes: 290271de34f6 ("drm/i915: Spin for struct_mutex inside shrinker")
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: <drm-intel-fixes at lists.freedesktop.org> # v4.13-rc1+
Gets rid of the hang for my BDW.
Tested-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
More information about the Intel-gfx
mailing list