[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 05 May 2015 11:25:35 -0700
From: Dave Hansen <dave.hansen@...ux.intel.com>
To: Ingo Molnar <mingo@...nel.org>
CC: linux-kernel@...r.kernel.org,
Andy Lutomirski <luto@...capital.net>,
Borislav Petkov <bp@...en8.de>,
Fenghua Yu <fenghua.yu@...el.com>,
"H. Peter Anvin" <hpa@...or.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Oleg Nesterov <oleg@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists