From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753943AbcAMX4W (ORCPT ); Wed, 13 Jan 2016 18:56:22 -0500 Received: from mga03.intel.com ([134.134.136.65]:46158 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753889AbcAMX4V (ORCPT ); Wed, 13 Jan 2016 18:56:21 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,291,1449561600"; d="scan'208";a="726504840" Subject: Re: [RFC 09/13] x86/mm: Disable interrupts when flushing the TLB using CR3 To: Andy Lutomirski References: <5696E129.9000804@linux.intel.com> Cc: Linus Torvalds , Oleg Nesterov , X86 ML , Borislav Petkov , Linux Kernel Mailing List , "linux-mm@kvack.org" , Brian Gerst From: Dave Hansen Message-ID: <5696E420.9040704@linux.intel.com> Date: Wed, 13 Jan 2016 15:56:16 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/13/2016 03:51 PM, Andy Lutomirski wrote: > On Wed, Jan 13, 2016 at 3:43 PM, Dave Hansen > wrote: >> On 01/13/2016 03:35 PM, Andy Lutomirski wrote: >>> Can anyone here ask a hardware or microcode person what's going on >>> with CR3 writes possibly being faster than INVPCID? Is there some >>> trick to it? >> >> I just went and measured it myself this morning. "INVPCID Type 3" (all >> contexts no global) on a Skylake system was 15% slower than a CR3 write. >> >> Is that in the same ballpark from what you've observed? > > It's similar, except that I was comparing "INVPCID Type 1" (single > context no globals) to a CR3 write. Ahh, because you're using PCID... That one I saw as being ~1.85x the number of cycles that a CR3 write was. > Type 2, at least, is dramatically faster than the pair of CR4 writes > it replaces. Yeah, I saw the same thing. Type 2 was ~2.4x faster than the CR4 writes.