From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755042AbcAIA1l (ORCPT ); Fri, 8 Jan 2016 19:27:41 -0500 Received: from mga14.intel.com ([192.55.52.115]:33187 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752789AbcAIA1j (ORCPT ); Fri, 8 Jan 2016 19:27:39 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,541,1444719600"; d="scan'208";a="856783999" Subject: Re: [RFC 13/13] x86/mm: Try to preserve old TLB entries using PCID To: Andy Lutomirski , x86@kernel.org, linux-kernel@vger.kernel.org References: Cc: Borislav Petkov , Brian Gerst , Linus Torvalds , Oleg Nesterov , "linux-mm@kvack.org" From: Dave Hansen Message-ID: <569053F9.7060002@linux.intel.com> Date: Fri, 8 Jan 2016 16:27:37 -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=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/08/2016 03:15 PM, Andy Lutomirski wrote: > + * The guiding principle of this code is that TLB entries that have > + * survived more than a small number of context switches are mostly > + * useless, so we don't try very hard not to evict them. Big ack on that. The original approach tried to keep track of the full 4k worth of possible PCIDs, it also needed an additional cpumask (which it dynamically allocated) for where the PCID was active in addition to the normal "where has this mm been" mask. That's a lot of extra data to mangle, and I can definitely see your approach as being nicer, *IF* the hardware isn't doing something useful with the other 9 bits of PCID that you're throwing away. ;)