Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965220AbbEESZk (ORCPT ); Tue, 5 May 2015 14:25:40 -0400 Received: from mga11.intel.com ([192.55.52.93]:56095 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752797AbbEESZh (ORCPT ); Tue, 5 May 2015 14:25:37 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,374,1427785200"; d="scan'208";a="724149188" Message-ID: <55490B1F.3080409@linux.intel.com> Date: Tue, 05 May 2015 11:25:35 -0700 From: Dave Hansen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Ingo Molnar CC: linux-kernel@vger.kernel.org, Andy Lutomirski , Borislav Petkov , Fenghua Yu , "H. Peter Anvin" , Linus Torvalds , Oleg Nesterov , Thomas Gleixner Subject: Re: [PATCH 084/208] x86/fpu: Rename xsave.header::xstate_bv to 'xfeatures' References: <1430848300-27877-1-git-send-email-mingo@kernel.org> <1430848300-27877-6-git-send-email-mingo@kernel.org> <554904A6.8040503@linux.intel.com> <20150505181613.GA28562@gmail.com> In-Reply-To: <20150505181613.GA28562@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1231 Lines: 28 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/