lkml.org 
[lkml]   [2015]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 084/208] x86/fpu: Rename xsave.header::xstate_bv to 'xfeatures'
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.


\
 
 \ /
  Last update: 2015-05-05 21:01    [W:0.420 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site