[Intel-gfx] [PATCH i-g-t 2/2] igt: Add VC4 purgeable BO tests

Chris Wilson chris at chris-wilson.co.uk
Wed Sep 27 12:50:30 UTC 2017


Quoting Boris Brezillon (2017-09-27 13:41:41)
> Hi Chris,
> 
> On Wed, 27 Sep 2017 13:07:28 +0100
> Chris Wilson <chris at chris-wilson.co.uk> wrote:
> 
> > Quoting Boris Brezillon (2017-09-27 12:51:18)
> > > +static void igt_vc4_trigger_purge(int fd)
> > > +{  
> > 
> > May I suggest a /proc/sys/vm/drop_caches-esque interface?
> > For when you want to explicitly control reclaim.
> 
> Eric suggested to add a debugfs entry to control the purge, I just
> thought I didn't really need it since I had a way to trigger this
> mechanism without adding yet another userspace -> kernel interface that
> will become part of the ABI and will have to be maintained forever.
> 
> If you think this is preferable, I'll go for the debugfs hook.

I think you will find it useful in future. i915's drop-caches also has
options to make sure the GPU is idle, delayed frees are flushed, etc.
One thing we found useful is that through a debugfs interface, we can
pretend to be the shrinker/in-reclaim, setting
fs_reclaim_acquire(GFP_KERNEL) around the operation. That gives us
better lockdep coverage without having to trigger the shrinker.

Our experience says that you will make good use of a drop-caches
interface, it won't just be a one test wonder. :)
-Chris


More information about the Intel-gfx mailing list