Received: by 10.213.65.68 with SMTP id h4csp344459imn; Fri, 30 Mar 2018 22:41:25 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/5o2mO1m7zQdBLAegLt+uCZI7tTdBSLgAnSMJoOTZuWN5Mq5ckWijZx9fIdIMEp+T79OrU X-Received: by 2002:a17:902:64cf:: with SMTP id y15-v6mr1869030pli.49.1522474885654; Fri, 30 Mar 2018 22:41:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522474885; cv=none; d=google.com; s=arc-20160816; b=A85P8bFU3Fw9tts1szD+iLyRLJ0d9rJHxQIC+o3Uqfx6CTE2GCJ+jaS8hR2zzbIGwb 8fcdbdfEZPBKVDCUQQKvhSBcC9lX2iTx8D7e6494N+P36sK1yEoNKYr25jwC3u93GJgq dU7QKdYyoEzUorGXIHOdy22y1b64yGjbf2atnDi7sCFpjZLHAk5fEI1owYoePDaKK+Jf NIjHtZzhnozSPJgtj+/ekrga9lFtBpE/NJt7WpJD7eN9PNKkWnqmuUKzlKTcVLRU9iTC RyOtNsSXiio0G2maokVqLCJ1W7BXnDn2ClzM9zMhrepBDBRPFWCg5rRQlGfnNiXPFZFk Cixg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=iPTNEq89HgPjeN27R4fqEBoJCyUNVvP+0iG6WK/POHo=; b=GqPD4NDfDtuP+yu2qcE0XsUqvnu21Wp0U1kgZ4RpI41futQR2vp5ZU4WZtRHcArrPK FTxTPnet/54sD//SKZumgnAazt67H8knHdBavsk6GCm6czitNv+o+HjvHPHs5WrFHgSE BHwY9QvtHqxW1n68nnGxtfG2Pzg4Wn+nvFDOo8EJIH/jCOlxIwMCuI3LXw624P7v+/Ks LLcowdmihE2AmkXioVw47Rxj6IVvWv5C7YtJLT/6H35/ej1SSnZbYKmuNXB5yVDNx1sO BOA/u86AWZ4vChDRnnd5fiVpWxCKqx2fm4sXJD/r5CQQHKiv9Y0WX4uYOKR1BZT92ior k5og== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=o6TrimEQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y185si6621758pgd.359.2018.03.30.22.41.11; Fri, 30 Mar 2018 22:41:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=o6TrimEQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751432AbeCaFkC (ORCPT + 99 others); Sat, 31 Mar 2018 01:40:02 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:35679 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750776AbeCaFkA (ORCPT ); Sat, 31 Mar 2018 01:40:00 -0400 Received: by mail-wr0-f196.google.com with SMTP id 80so9403523wrb.2 for ; Fri, 30 Mar 2018 22:40:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=iPTNEq89HgPjeN27R4fqEBoJCyUNVvP+0iG6WK/POHo=; b=o6TrimEQMTYj0YItTWtD7t4p/2+Ta6OsV1oxNkNSfm1VZkl9TYHhuDfIUFNCLGF11s jN3AgjBS3Dwwqe8j4es2LOLs037ZuKXJ4PW3yhJBVhT69vF6FP1LbUac3j2/U5vcFviP J/BmLSv3nxpM8eVLuPcKLHBhfqWf/x0ud9rQn4jn7pD48/4gHu7gV34y3HJ2gDa5O13Y YL67uEcDq36qCiJ7c0h9yfJAxkjLtR+Zi3TLnqgkxmK2kwQGHtGpb78bLAZuMfhqQk/0 rA8DdfZ6+Hpn5PNrshk/eDIiWFZKECB6QocP76EGVS5H1iULK4f4XcpQ1j6LGFOA/KEX 13yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=iPTNEq89HgPjeN27R4fqEBoJCyUNVvP+0iG6WK/POHo=; b=WzVw7lRjFG9ZshcyjapDGbWNOWfNifh3jTc2pbzwxGpALPoRFi1D4SdEU3kZLTjZLa k7fQLQCaU6a73lPJzycckf6sMNzZNziaN4kXXAWg0rpwmbOPb+tzXCjimJKZOyF1RYNC WqTJhOvJWXuqvxQCgeCkmiEpAx5+XdeaMpGndQf771r8+3x6aSCDhxP2JkmvX7I+rEQS wqw7rw4C0QRouPE56kU2SkJRHrJZPbAYvL6NvWE/06wKNtZ7jg6jHxvVAAjqF6uKzkyb 7v3KgyLIrBQyU5O50K2PQRl1a7dVn1pLikmGoeDDlUe54IvuMH4C9uFzRKIJt9jxGiRy mFzw== X-Gm-Message-State: AElRT7HbQMK4Zma8HvAYiXofKhVumOgszl5ZECMf2KqytlwYaPWl7APv S7kq41GbVIMJZ3s9VNjwmq0= X-Received: by 10.223.201.12 with SMTP id m12mr1109641wrh.158.1522474799675; Fri, 30 Mar 2018 22:39:59 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id p137sm8683064wmd.41.2018.03.30.22.39.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Mar 2018 22:39:58 -0700 (PDT) Date: Sat, 31 Mar 2018 07:39:56 +0200 From: Ingo Molnar To: Dave Hansen Cc: Thomas Gleixner , Linus Torvalds , Linux Kernel Mailing List , linux-mm , Andrea Arcangeli , Andrew Lutomirski , Kees Cook , Hugh Dickins , =?iso-8859-1?Q?J=FCrgen_Gro=DF?= , the arch/x86 maintainers , namit@vmware.com Subject: Re: [PATCH 00/11] Use global pages with PTI Message-ID: <20180331053956.uts5yhxfy7ud4bpf@gmail.com> References: <20180327200719.lvdomez6hszpmo4s@gmail.com> <0d6ea030-ec3b-d649-bad7-89ff54094e25@linux.intel.com> <20180330120920.btobga44wqytlkoe@gmail.com> <20180330121725.zcklh36ulg7crydw@gmail.com> <3cdc23a2-99eb-6f93-6934-f7757fa30a3e@linux.intel.com> <62a0dbae-75eb-6737-6029-4aaf72ebd199@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <62a0dbae-75eb-6737-6029-4aaf72ebd199@linux.intel.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Dave Hansen wrote: > On 03/30/2018 01:32 PM, Thomas Gleixner wrote: > > On Fri, 30 Mar 2018, Dave Hansen wrote: > > > >> On 03/30/2018 05:17 AM, Ingo Molnar wrote: > >>> BTW., the expectation on !PCID Intel hardware would be for global pages to help > >>> even more than the 0.6% and 1.7% you measured on PCID hardware: PCID already > >>> _reduces_ the cost of TLB flushes - so if there's not even PCID then global pages > >>> should help even more. > >>> > >>> In theory at least. Would still be nice to measure it. > >> > >> I did the lseek test on a modern, non-PCID system: > >> > >> No Global pages (baseline): 6077741 lseeks/sec > >> 94 Global pages (this set): 8433111 lseeks/sec > >> +2355370 lseeks/sec (+38.8%) > > > > That's all kernel text, right? What's the result for the case where global > > is only set for all user/kernel shared pages? > > Yes, that's all kernel text (94 global entries). Here's the number with > just the entry data/text set global (88 global entries on this system): > > No Global pages (baseline): 6077741 lseeks/sec > 88 Global Pages (kentry ): 7528609 lseeks/sec (+23.9%) > 94 Global pages (this set): 8433111 lseeks/sec (+38.8%) Very impressive! Please incorporate the performance numbers in patches #9 and #11. There were a couple of valid review comments which need to be addressed as well, but other than that it all looks good to me and I plan to apply the next iteration. In fact I think I'll try to put it into the backporting tree: as PGE was really the pre PTI status quo and thus we should expect few quirks/bugs in this area, plus we still want to share as much core PTI logic with the -stable kernels as possible. The performance plus doesn't hurt either ... after so much lost performance. Thanks, Ingo