drm/i915: Add an rcu_barrier option to i915_drop_caches
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 11 Oct 2019 17:38:23 +0000 (18:38 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 11 Oct 2019 18:33:03 +0000 (19:33 +0100)
commit54895010a893cdbf0aaf34fbd7719d750b557eb2
tree98948552fb711884205259c85a446764e4940574
parentcbbf2787782ca5d17b479deb962a07f0421a7932
drm/i915: Add an rcu_barrier option to i915_drop_caches

Sometimes a test has to wait for RCU to complete a grace period and
perform its callbacks, for example waiting for a close(fd) to actually
perform the fput(filp) and so trigger all the callbacks such as closing
GEM contexts. There is no trivial means of triggering an RCU barrier
from userspace, so add one for our convenience in
debugfs/i915_drop_caches

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
Reviewed-by: Matthew Auld <matthew.william.auld@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191011173823.20432-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_debugfs.c