Messages in this thread | | | Date | Thu, 7 May 2015 21:35:31 +0200 | From | Ingo Molnar <> | Subject | Re: [PATCH 084/208] x86/fpu: Rename xsave.header::xstate_bv to 'xfeatures' |
| |
* Dave Hansen <dave.hansen@linux.intel.com> 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
| |