[Intel-gfx] [PATCH] drm/i915/tgl: Add sysfs interface to control class-of-service
Kumar Valsan, Prathap
prathap.kumar.valsan at intel.com
Mon Sep 9 22:52:12 UTC 2019
On Mon, Sep 09, 2019 at 02:50:20PM +0300, Joonas Lahtinen wrote:
> Quoting Prathap Kumar Valsan (2019-08-26 01:48:01)
> > To provide shared last-level-cache isolation to cpu workloads running
> > concurrently with gpu workloads, the gpu allocation of cache lines needs
> > to be restricted to certain ways. Currently GPU hardware supports four
> > class-of-service(CLOS) levels and there is an associated way-mask for
> > each CLOS.
> >
> > Hardware supports reading supported way-mask configuration for GPU using
> > a bios pcode interface. The supported way-masks and the one currently
> > active is communicated to userspace via a sysfs file--closctrl. Admin user
> > can then select a new mask by writing the mask value to the file.
> >
> > Note of Caution: Restricting cache ways using this mechanism presents a
> > larger attack surface for side-channel attacks.
>
> I wonder if this is enough to justify some further protection before
> enabling?
Should there be a kernel warning message on enabling this or a commit
message is enough?
>
> > Example usage:
> > The active way-mask is highlighted within square brackets.
> > > cat /sys/class/drm/card0/closctrl
> > [0xffff] 0xff00 0xc000 0x8000
>
> How about two files for easier scripting interface?
>
> /sys/class/drm/card0/llc_clos
> /sys/class/drm/card0/llc_clos_modes
>
Agreed. A single file interface was suggested by Jon. Hope he is ok with having
two files :)
> Regards, Joonas
Thanks,
Prathap
More information about the Intel-gfx
mailing list