Received: by 10.213.65.68 with SMTP id h4csp821407imn; Fri, 23 Mar 2018 17:47:51 -0700 (PDT) X-Google-Smtp-Source: AG47ELsp1bnIVHPXEZPLmzr0ROlHpzztM3h1LSR4wVE7CNTXJkFhaZdTu5KIX2ROftzH9wxYgc1o X-Received: by 10.99.116.22 with SMTP id p22mr8082421pgc.265.1521852470946; Fri, 23 Mar 2018 17:47:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521852470; cv=none; d=google.com; s=arc-20160816; b=RCEJ7FOec1Eu7LRa3tv6XSa9XlEO/WJYviHHiZY/gI10yVnHXM94Vo37g8l0Wqi2e1 3hRbsqFoaw96ms39S4Lf3nU/1wQS9hrLnUvS4X8Q3w+YGrIlwOUe1YruZjAvnHsgwh+Q vglpJfQcSYvw9ddYBCzxI6cdzjoYGlj+GoqQRL95oWPKwpdlp7JZMu+flzRB9qqC0z9l xUD4/XsXBbv60xAtnLV/Pt+rqyT2un3TwYuJAtpLHj9dhCKKPSxF+rHmJj0KCiZVsh1R g9K4ipcCEvH9M354adbviM3Ty6bTt6PdFp+9IKZmdsXoFAjG06HYQxMZioCYif4GCJ+d /Ilw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=WdNpvYCeWivAkAEetCso1KdtjSrMC8d3RzNWW2qKdDs=; b=GSYLWt8zInKuiRedYfT09pfsHil/kwvzlfr3bDJBVofLo+Itb7fdBfSc55T/HmKI5y FnJTFC+AjKEPjmKsfRRk+sIiBGK8Yr+NB4LKO222Uz0kLcNWF3wM3SINvOuN6IpZ0oI2 ju1TLX/fnPp/GsZJELjhe/p/8Q+SCzNl4V2wvD98Za9Q/6URrBMn9fkX38pw8+CA5KWM ZujHOA83p2VtN9z/+xkdguA/7Onkp+anLjpzNwFwJs/PFIq2yUjn2HsZkDPxWOx9puEg IlUqi74dcbGVP8MFduiMg2HqRdRi3g7EPLpHyKtaDnssSRM1evbuW0jQaGbipL5glQbe N60A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=HIW8i7Hr; dkim=fail header.i=@linux-foundation.org header.s=google header.b=dGC0uFwl; 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 c2-v6si9381640plb.607.2018.03.23.17.47.36; Fri, 23 Mar 2018 17:47:50 -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=HIW8i7Hr; dkim=fail header.i=@linux-foundation.org header.s=google header.b=dGC0uFwl; 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 S1751840AbeCXAqp (ORCPT + 99 others); Fri, 23 Mar 2018 20:46:45 -0400 Received: from mail-it0-f42.google.com ([209.85.214.42]:54676 "EHLO mail-it0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751541AbeCXAqn (ORCPT ); Fri, 23 Mar 2018 20:46:43 -0400 Received: by mail-it0-f42.google.com with SMTP id w3-v6so4585154itc.4 for ; Fri, 23 Mar 2018 17:46:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=WdNpvYCeWivAkAEetCso1KdtjSrMC8d3RzNWW2qKdDs=; b=HIW8i7Hr0GagD4tzx7NGpYs5/5Hk6FYL84NGpgay0OIGa2vFOR2lz7cntrP724BDzb UUt3M0ArG7LdbBIHVXRUpliagPZF71+q1Qsafm5p0AgcQb8xUBV1kw1Pf+Tf4m95UzjA dQluii/+xZ1npS+1GdJwNf3wEmm/dwhSlj59vVeJx6rTak2tNnmvvTdJ+X0d51QEIOmA I6Hq97qoTw7wA5khqhPAb/ObBg6zNuXpmWXxRCs2ntHicAtFo0Jny2HbDd3Fgj5ZTFpN FUHGJIuYB7gx44C73c/4R7ZsqwUBugGljuNTeRRysKSKk6T2YwBdUPLDM7e9KUT3/zYT Jn9Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=WdNpvYCeWivAkAEetCso1KdtjSrMC8d3RzNWW2qKdDs=; b=dGC0uFwlFmhdob83Vih5g0kVofBjLv/EQLqy0wCX5n744kribpE17EqfwtI/4R1FtG QZqU6wC3eH1A6G0XBn3eTsLc84fxi+M9mxRNB8wJy/RA/CURaHoea6ETb2PFWSDlBcdJ 4O9y6a7AvooK7s68Z9U1KvSkqr5bBfWINWncQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=WdNpvYCeWivAkAEetCso1KdtjSrMC8d3RzNWW2qKdDs=; b=dliLCNeuvxTLG691aZ/F8Z7nxQd9YlknPsDkMOCs0squMNhJYl2oWwZpjXZctEsxB+ GXTamDfWMhzAhR/pGiUhJzQx3KrbybSjKxnWsiqzTLRNAA4GKp3RtBhHbukssMFgDPQY +1gtuG3xACAi00V70HXN7AIJrZgLPjacUWLesmjmY09EupOLnBZ78ymLWHkMDBrQrSpf KnX1txinjPo4N5cFrOaR2OtxR4lpksiJna9reRZ8zFlP2s0EnJPZx9UKA4tRuISrJz7d Zh0vJo4xbng4rk5vggDA3wfzggdrRCSDKYjovV1onyTIMKK+oYoWdCxALZv8NoGwCztE A6tA== X-Gm-Message-State: AElRT7ENeKAG/a1qN056JGGf4ZEuNwxRG3R2stUBc3jJuoIUUtz2IjUU OXtsS3QwEFpHJ+pS4tIUzMghLPVZAAb9gpJXqp4= X-Received: by 2002:a24:87c8:: with SMTP id f191-v6mr3446035ite.16.1521852402965; Fri, 23 Mar 2018 17:46:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.95.15 with HTTP; Fri, 23 Mar 2018 17:46:42 -0700 (PDT) In-Reply-To: References: <20180323174447.55F35636@viggo.jf.intel.com> From: Linus Torvalds Date: Fri, 23 Mar 2018 17:46:42 -0700 X-Google-Sender-Auth: HIBzCSzq1S-fIdVDXF1BcMoNpWc Message-ID: Subject: Re: [PATCH 00/11] Use global pages with PTI To: Dave Hansen Cc: Linux Kernel Mailing List , linux-mm , Andrea Arcangeli , Andrew Lutomirski , Kees Cook , Hugh Dickins , =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= , "the arch/x86 maintainers" , namit@vmware.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 23, 2018 at 5:40 PM, Dave Hansen wrote: > > Well, rats. This somehow makes things slower with PCIDs on. .. what happens when you enable global pages with PCID? You disabled them explicitly because you thought they wouldn't matter.. Even with PCID, a global TLB entry for the shared pages would make sense, because it's now just *one* entry in the TLB rather that "one per PCID and one for the kernel mapping". So even if in theory the lifetime of the TLB entry is the same, when you have capacity misses it most definitely isn't. And for process tear-down and build-up the per-PCID TLB entry does nothing at all. While for a true global entry, it gets shared even across process creation/deletion. So even ignoring TLB capacity issues, with lots of shortlived processes global TLB entries are much better. It is, of course, possible that I misunderstood what you actually benchmarked. But I assume the above benchmark numbers are with the whole "don't even do global entries if you have PCID". Linus