From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f170.google.com (mail-pf0-f170.google.com [209.85.192.170]) by kanga.kvack.org (Postfix) with ESMTP id 461106B025B for ; Fri, 8 Jan 2016 19:27:40 -0500 (EST) Received: by mail-pf0-f170.google.com with SMTP id n128so16553502pfn.3 for ; Fri, 08 Jan 2016 16:27:40 -0800 (PST) Received: from mga02.intel.com (mga02.intel.com. [134.134.136.20]) by mx.google.com with ESMTP id sl3si20021783pac.220.2016.01.08.16.27.39 for ; Fri, 08 Jan 2016 16:27:39 -0800 (PST) Subject: Re: [RFC 13/13] x86/mm: Try to preserve old TLB entries using PCID References: From: Dave Hansen Message-ID: <569053F9.7060002@linux.intel.com> Date: Fri, 8 Jan 2016 16:27:37 -0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Andy Lutomirski , x86@kernel.org, linux-kernel@vger.kernel.org Cc: Borislav Petkov , Brian Gerst , Linus Torvalds , Oleg Nesterov , "linux-mm@kvack.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. ;) -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org 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. ;)