From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f72.google.com (mail-it0-f72.google.com [209.85.214.72]) by kanga.kvack.org (Postfix) with ESMTP id 3D8D2440905 for ; Fri, 14 Jul 2017 05:03:21 -0400 (EDT) Received: by mail-it0-f72.google.com with SMTP id k192so103000261ith.0 for ; Fri, 14 Jul 2017 02:03:21 -0700 (PDT) Received: from gate.crashing.org (gate.crashing.org. [63.228.1.57]) by mx.google.com with ESMTPS id p132si1672318itb.11.2017.07.14.02.03.19 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 14 Jul 2017 02:03:20 -0700 (PDT) Message-ID: <1500022977.2865.88.camel@kernel.crashing.org> Subject: Re: Potential race in TLB flush batching? From: Benjamin Herrenschmidt Date: Fri, 14 Jul 2017 19:02:57 +1000 In-Reply-To: <20170714083114.zhaz3pszrklnrn52@suse.de> References: <20170711092935.bogdb4oja6v7kilq@suse.de> <20170711132023.wdfpjxwtbqpi3wp2@suse.de> <20170711155312.637eyzpqeghcgqzp@suse.de> <20170711191823.qthrmdgqcd3rygjk@suse.de> <1500015641.2865.81.camel@kernel.crashing.org> <20170714083114.zhaz3pszrklnrn52@suse.de> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Mel Gorman Cc: Andy Lutomirski , Nadav Amit , linux-mm@kvack.org, "Aneesh Kumar K.V" On Fri, 2017-07-14 at 09:31 +0100, Mel Gorman wrote: > It may also be only a gain on a limited number of architectures depending > on exactly how an architecture handles flushing. At the time, batching > this for x86 in the worse-case scenario where all pages being reclaimed > were mapped from multiple threads knocked 24.4% off elapsed run time and > 29% off system CPU but only on multi-socket NUMA machines. On UMA, it was > barely noticable. For some workloads where only a few pages are mapped or > the mapped pages on the LRU are relatively sparese, it'll make no difference. > > The worst-case situation is extremely IPI intensive on x86 where many > IPIs were being sent for each unmap. It's only worth even considering if > you see that the time spent sending IPIs for flushes is a large portion > of reclaim. Ok, it would be interesting to see how that compares to powerpc with its HW tlb invalidation broadcasts. We tend to hate them and prefer IPIs in most cases but maybe not *this* case .. (mostly we find that IPI + local inval is better for large scale invals, such as full mm on exit/fork etc...). In the meantime I found the original commits, we'll dig and see if it's useful for us. Cheers, Ben. -- 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