From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935736AbdKPTZi (ORCPT ); Thu, 16 Nov 2017 14:25:38 -0500 Received: from mga09.intel.com ([134.134.136.24]:16438 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935553AbdKPTZV (ORCPT ); Thu, 16 Nov 2017 14:25:21 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,405,1505804400"; d="scan'208";a="174376288" Subject: Re: [PATCH 23/30] x86, kaiser: use PCID feature to make user and kernel switches faster To: Andrea Arcangeli References: <20171110193058.BECA7D88@viggo.jf.intel.com> <20171110193150.1E736CE0@viggo.jf.intel.com> <20171116191931.GC2344@redhat.com> Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, moritz.lipp@iaik.tugraz.at, daniel.gruss@iaik.tugraz.at, michael.schwarz@iaik.tugraz.at, richard.fellner@student.tugraz.at, luto@kernel.org, torvalds@linux-foundation.org, keescook@google.com, hughd@google.com, x86@kernel.org From: Dave Hansen Message-ID: <157fa017-16d8-af5b-f6c3-77794c0546cf@linux.intel.com> Date: Thu, 16 Nov 2017 11:25:10 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171116191931.GC2344@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/16/2017 11:19 AM, Andrea Arcangeli wrote: > On Fri, Nov 10, 2017 at 11:31:50AM -0800, Dave Hansen wrote: >> Hugh Dickins also points out that PCIDs really have two distinct >> use-cases in the context of KAISER. The first way they can be used > I don't see why you try to retain such a minor optimization for newer > Intel chips when at the same you prevent KAISER to run with good > performance on older Intel chips like SandyBridge/IvyBridge which > would create a major performance regression for those two. This was more straightforward to do. The other way requires having *TWO* PCID modes. So, we need to disambiguate the two modes in the existing infrastructure in addition to adding KAISER. Had I gone and done that, my fear was that we would be left with no usable PCIDs on *any* hardware. So, this was easier, I went and did it first, and I'd love to see someone add support for PCIDs on those older non-INVPCID systems. "Someone" may even be me, but it'll be in v2. Patches welcome before then. :)