Re: [PATCH 084/208] x86/fpu: Rename xsave.header::xstate_bv to 'xfeatures'
From: Dave Hansen
Date: Tue May 05 2015 - 14:25:44 EST
On 05/05/2015 11:16 AM, Ingo Molnar wrote:
> We could put the SDM name into a comment, next to the field
> definition? Something like, if 'xfeatures' is too long:
>
> struct xstate_header {
> u64 xfeat; /* xstate components, SDM: XSTATE_BV */
> u64 xfeat_comp; /* compacted xstate components, SDM: XCOMP_BV */
> u64 reserved[6];
> } __attribute__((packed));
When you're in the depths of the SDM and the kernel code, the fewer
context switches you have to make, the better. I say this from the
perspective of someone who's had a copy of the SDM open to xsave* for
about a month straight.
In any case, having "xfeat" and "xfeat_comp" is a bad idea. They're not
really related concepts other than their bits refer to the same states.
They should not have such similar names.
XSTATE_BV is the set of states written to the xsave area.
XCOMP_BV is essentially always XCR0 (aka pcntxt_mask, aka
xfeatures_mask) or'd with bit 63.
--
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/