[Intel-gfx] [PATCH] drm/i915: Keep a per-engine request pools
Chris Wilson
chris at chris-wilson.co.uk
Fri Apr 3 14:02:28 UTC 2020
Quoting Janusz Krzysztofik (2020-04-03 14:58:47)
> On Thu, 2020-04-02 at 19:40 +0100, Chris Wilson wrote:
> > Add a tiny per-engine request mempool so that we should always have a
> > request available for powermanagement allocations from tricky
> > contexts. This reserve is expected to be only used for kernel
> > contexts when barriers must be emitted [almost] without fail.
> >
> > The main consumer for this reserved request is expected to be engine-pm,
> > for which we know that there will always be at least the previous pm
> > request that we can reuse under mempressure (so there should always be
> > a spare request for engine_park()).
> >
> > This is an alternative to using a comparatively bulky mempool, which
> > requires custom handling for both our reserved allocation requirement
> > and to protect our TYPESAFE_BY_RCU slab cache.
>
> This change resolves the issue for me, and being more simple than the
> mempool approach, looks still better.
Cool. I couldn't decide if mempool was worth it or not. If we needed
more than a single slot, definitely, but the impedance mismatch and that
the general advice is not to add more mempools suggest no.
Thanks,
-Chris
More information about the Intel-gfx
mailing list