From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f197.google.com (mail-io0-f197.google.com [209.85.223.197]) by kanga.kvack.org (Postfix) with ESMTP id 4B6096B0012 for ; Fri, 23 Mar 2018 20:46:44 -0400 (EDT) Received: by mail-io0-f197.google.com with SMTP id r24so11631601ioa.11 for ; Fri, 23 Mar 2018 17:46:44 -0700 (PDT) Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id f131-v6sor4928516itd.87.2018.03.23.17.46.43 for (Google Transport Security); Fri, 23 Mar 2018 17:46:43 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20180323174447.55F35636@viggo.jf.intel.com> From: Linus Torvalds Date: Fri, 23 Mar 2018 17:46:42 -0700 Message-ID: Subject: Re: [PATCH 00/11] Use global pages with PTI Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: 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 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