From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424157AbeCBPeI (ORCPT ); Fri, 2 Mar 2018 10:34:08 -0500 Received: from mga11.intel.com ([192.55.52.93]:38783 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423376AbeCBPeD (ORCPT ); Fri, 2 Mar 2018 10:34:03 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,412,1515484800"; d="scan'208";a="205024748" Subject: Re: [PATCH v4 2/3] mm/free_pcppages_bulk: do not hold lock when picking pages to free To: Aaron Lu , Michal Hocko References: <20180301062845.26038-1-aaron.lu@intel.com> <20180301062845.26038-3-aaron.lu@intel.com> <20180301135518.GJ15057@dhcp22.suse.cz> <20180302071533.GA6356@intel.com> Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Huang Ying , Kemi Wang , Tim Chen , Andi Kleen , Vlastimil Babka , Mel Gorman , Matthew Wilcox , David Rientjes From: Dave Hansen Message-ID: Date: Fri, 2 Mar 2018 07:34:01 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180302071533.GA6356@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/01/2018 11:15 PM, Aaron Lu wrote: > >> I am still quite surprised that this would have such a large impact. > Most likely due to the cachelines for these page structures are warmed > up outside of zone->lock. The workload here is a pretty tight microbenchmark and single biggest bottleneck is cache misses on 'struct page'. It's not memory bandwidth bound. So, anything you can give the CPU keep it fed and not waiting on cache misses will be a win. There's never going to be a real-world workload that sees this kind of increase, but the change in the micro isn't super-surprising because it so directly targets the bottleneck. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f198.google.com (mail-pf0-f198.google.com [209.85.192.198]) by kanga.kvack.org (Postfix) with ESMTP id 761356B0007 for ; Fri, 2 Mar 2018 10:34:04 -0500 (EST) Received: by mail-pf0-f198.google.com with SMTP id g66so5450759pfj.11 for ; Fri, 02 Mar 2018 07:34:04 -0800 (PST) Received: from mga06.intel.com (mga06.intel.com. [134.134.136.31]) by mx.google.com with ESMTPS id a88si5132882pfk.40.2018.03.02.07.34.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Mar 2018 07:34:03 -0800 (PST) Subject: Re: [PATCH v4 2/3] mm/free_pcppages_bulk: do not hold lock when picking pages to free References: <20180301062845.26038-1-aaron.lu@intel.com> <20180301062845.26038-3-aaron.lu@intel.com> <20180301135518.GJ15057@dhcp22.suse.cz> <20180302071533.GA6356@intel.com> From: Dave Hansen Message-ID: Date: Fri, 2 Mar 2018 07:34:01 -0800 MIME-Version: 1.0 In-Reply-To: <20180302071533.GA6356@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Aaron Lu , Michal Hocko Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Huang Ying , Kemi Wang , Tim Chen , Andi Kleen , Vlastimil Babka , Mel Gorman , Matthew Wilcox , David Rientjes On 03/01/2018 11:15 PM, Aaron Lu wrote: > >> I am still quite surprised that this would have such a large impact. > Most likely due to the cachelines for these page structures are warmed > up outside of zone->lock. The workload here is a pretty tight microbenchmark and single biggest bottleneck is cache misses on 'struct page'. It's not memory bandwidth bound. So, anything you can give the CPU keep it fed and not waiting on cache misses will be a win. There's never going to be a real-world workload that sees this kind of increase, but the change in the micro isn't super-surprising because it so directly targets the bottleneck. -- 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