From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752414AbdLFRdV (ORCPT ); Wed, 6 Dec 2017 12:33:21 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:44966 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752336AbdLFRdR (ORCPT ); Wed, 6 Dec 2017 12:33:17 -0500 X-Google-Smtp-Source: AGs4zMYgHJy+u1XH4J/AfbExFipF+CXVizB0kopWZ+Ab0DLFoj7Sahfcd2kR6UuQQHNQUoKV2L9pCw== Date: Wed, 6 Dec 2017 18:33:13 +0100 From: Ingo Molnar To: Dave Hansen Cc: the arch/x86 maintainers , Andy Lutomirski , LKML , Linux-MM , "Kleen, Andi" , "Chen, Tim C" , Linus Torvalds , Peter Zijlstra Subject: Re: x86 TLB flushing: INVPCID vs. deferred CR3 write Message-ID: <20171206173313.cnjuzn7p2wrmerui@gmail.com> References: <3062e486-3539-8a1f-5724-16199420be71@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3062e486-3539-8a1f-5724-16199420be71@intel.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Dave Hansen wrote: > tl;dr: Kernels with pagetable isolation using INVPCID compile kernels > 0.58% faster than using the deferred CR3 write. This tends to say that > we should leave things as-is and keep using INVPCID, but it's far from > definitive. Agreed, thanks for the detailed testing! > If folks have better ideas for a test methodology, or specific workloads or > hardware where you want to see this tested, please speak up. I had a look at the numbers and it all looks valid and good to me too - it's also the intuitive result IMHO. I suspect there might be synthetic cache-hot workloads where the +330 cycles cost of INVPCID is higher than that of the extra TLB miss costs of a CR3 flush - but we do know that this offset is constant, while the cost of flushing all TLBs ever increases with the future increases of the TLB cache. Thanks, Ingo