[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z8gOzG4uS51cX1Nk@intel.com>
Date: Wed, 5 Mar 2025 16:43:56 +0800
From: Chao Gao <chao.gao@...el.com>
To: Dave Hansen <dave.hansen@...el.com>
CC: <tglx@...utronix.de>, <x86@...nel.org>, <seanjc@...gle.com>,
<pbonzini@...hat.com>, <linux-kernel@...r.kernel.org>, <kvm@...r.kernel.org>,
<peterz@...radead.org>, <rick.p.edgecombe@...el.com>, <mlevitsk@...hat.com>,
<weijiang.yang@...el.com>, <john.allen@....com>
Subject: Re: [PATCH v2 3/6] x86/fpu/xstate: Introduce
XFEATURE_MASK_KERNEL_DYNAMIC xfeature set
On Tue, Mar 04, 2025 at 02:37:00PM -0800, Dave Hansen wrote:
>Subjects should ideally be written without large identifiers:
>
> Subject: x86/fpu/xstate: Introduce dynamic kernel features
will do.
>
>On 11/26/24 02:17, Chao Gao wrote:
>> Remove the kernel dynamic feature from fpu_kernel_cfg.default_features
>> so that the bits in xstate_bv and xcomp_bv are cleared and xsaves/xrstors
>> can be optimized by HW for normal fpstate.
>
>I'm really confused why this changelog hunk is here.
>
>Right now, all kernel XSAVE buffers have the same supervisor xfeatures.
>This introduces the idea that they can have different xfeature sets.
>
>The _purpose_ of this is to save space when only some FPUs need a given
>feature. This saves space in 'struct fpu'. It probably doesn't actually
>make XSAVE/XRSTOR any faster because the init optimization is very
>likely to be in place for these features.
Thanks for the detailed explanation. You're absolutely right—this change
aims to reduce the size of struct fpu. I see now that implying a perf
improvement for XSAVE/XRSTOR was misleading, as the underlying optimization
is likely handled by the init optimization. I'll revise the changelog to
clarify this and incorporate your wording to avoid confusion.
>
>I'm not sure what point the changelog was trying to make about xstate_bv
>and xcomp_bv. xstate_bv[12] would have been 0 if the feature was in its
>init state.
Powered by blists - more mailing lists