Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752999AbbEFS2A (ORCPT ); Wed, 6 May 2015 14:28:00 -0400 Received: from mga02.intel.com ([134.134.136.20]:21904 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752908AbbEFS16 (ORCPT ); Wed, 6 May 2015 14:27:58 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,380,1427785200"; d="scan'208";a="721755855" Message-ID: <554A5D23.2030405@linux.intel.com> Date: Wed, 06 May 2015 11:27:47 -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> <55490B1F.3080409@linux.intel.com> <20150506061603.GA13720@gmail.com> In-Reply-To: <20150506061603.GA13720@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: 2021 Lines: 48 On 05/05/2015 11:16 PM, Ingo Molnar wrote: > Btw., does Intel have any special plans with xstate compaction? > > AFAICS in Linux we just want to enable xfeat_mask_all to the max, > including compaction, and never really modify it (in the task's > lifetime). Special plans? If we do an XRSTORS on it before we do an XSAVES, then we need to worry. But, if we do an XSAVES, the CPU will set it up for us. > I'm also wondering whether there will be any real 'holes' in the > xfeatures capability masks of future CPUs: right now xfeatures tend to > be already 'compacted' (because new CPUs tend to support all > xfeatures), so compaction mostly appears to be an academic feature. Or > is there already hardware out there where it matter? There is a hole in the SDM today. See section 2.6 in the currently released 054 version. I also know of actual hardware platforms with holes. *PLUS*, someone can always shot down CPUID bits in their hypervisor or with kernel command-line options. > Maybe once we get AVX512 in addition to MPX we can use compaction > materially: as there will be lots of tasks without MPX state but with > AVX512 state - in fact I suspect that will be the common case. Right. But we'd need to get to a point where we are calling 'xsaves' with a Requested Feature BitMask (aka RFBM[]) that had holes in it. As it stands today, we always call it with RFBM=-1 and so we always have XCOMP_BV = XCR0. We'd need to determine which fields are in the init state before we do an xsaves. > OTOH MPX state is relatively small compared to AVX and AVX512 state, > so skipping the hole won't buy us much, and the question is, how > expensive is compaction, will save/restore be slower with compaction > enabled? Has to be measured I suspect. Yep. -- 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/