[PATCH 2/5] i915: flush gem obj freeing workqueues to add accuracy to the i915 shrinker

Chris Wilson chris at chris-wilson.co.uk
Fri Apr 7 10:02:11 UTC 2017

On Fri, Apr 07, 2017 at 01:23:44AM +0200, Andrea Arcangeli wrote:
> Waiting a RCU grace period only guarantees the work gets queued, but
> until after the queued workqueue returns, there's no guarantee the
> memory was actually freed. So flush the work to provide better
> guarantees to the reclaim code in addition of waiting a RCU grace
> period to pass.

We are not allowed to call flush_work() from the shrinker, the workqueue
doesn't have and can't have the right reclaim flags.

Chris Wilson, Intel Open Source Technology Centre

More information about the dri-devel mailing list