From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031243AbbD1Wlv (ORCPT ); Tue, 28 Apr 2015 18:41:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39649 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030901AbbD1Wlu (ORCPT ); Tue, 28 Apr 2015 18:41:50 -0400 Message-ID: <55400CA7.3050902@redhat.com> Date: Tue, 28 Apr 2015 18:41:43 -0400 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "Kirill A. Shutemov" , Andy Lutomirski , Dave Hansen CC: Linus Torvalds , Andrew Morton , Mel Gorman , linux-kernel@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org Subject: Re: PCID and TLB flushes (was: [GIT PULL] kdbus for 4.1-rc1) References: <20150428221553.GA5770@node.dhcp.inet.fi> In-Reply-To: <20150428221553.GA5770@node.dhcp.inet.fi> 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 04/28/2015 06:15 PM, Kirill A. Shutemov wrote: > On Tue, Apr 28, 2015 at 01:42:10PM -0700, Andy Lutomirski wrote: >> At some point, I'd like to implement PCID on x86 (if no one beats me >> to it, and this is a low priority for me), which will allow us to skip >> expensive TLB flushes while context switching. I have no idea whether >> ARM can do something similar. > > I talked with Dave about implementing PCID and he thinks that it will be > net loss. TLB entries will live longer and it means we would need to trigger > more IPIs to flash them out when we have to. Cost of IPIs will be higher > than benifit from hot TLB after context switch. I suspect that may depend on how you do the shootdown. If, when receiving a TLB shootdown for a non-current PCID, we just flush all the entries for that PCID and remove the CPU from the mm's cpu_vm_mask_var, we will never receive more than one shootdown IPI for a non-current mm, but we will still get the benefits of TLB longevity when dealing with eg. pipe workloads where tasks take turns running on the same CPU. -- All rights reversed