Re: [PATCH 084/208] x86/fpu: Rename xsave.header::xstate_bv to 'xfeatures'
From: Ingo Molnar
Date: Thu May 07 2015 - 15:35:42 EST
* Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx> wrote:
> >> It's not a problem today because the instruction mask is always
> >> -1, so it always has every bit set that *MIGHT* be set in
> >> XSTATE_BV.
> >
> > Yes. And why would we ever want to narrow it?
>
> Because it actually allows us to take advantage of the compaction.
> Think of the layout of a task using protection keys and MPX.
>
> MPX = 8*4 + 8*2 = 48 bytes.
> PKEYs = 4 bytes
>
> They'll be spread out in the standard form *OR* the compacted form
> with a RFBM=-1. But, with the compacted form with RFBM=PK|MPX_BITS,
> they'll fit in a cacheline.
but but ... if this is a normal userspace task then it will use AVX on
modern Linux distros and then we are up to a 1K FPU context size
already, 48 bytes won't make a visible dent - especially if compacted
form has some saving cost. With AVX512 we are at around 2K?
I certainly don't _object_ to using the compacted format, as it makes
sense and it's clearly getting quite a bit of attention from the
hardware folks, but we should run some timings and such.
In any case I'm mostly just curious, not worried.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/