From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934398AbeAXQ5u (ORCPT ); Wed, 24 Jan 2018 11:57:50 -0500 Received: from mga01.intel.com ([192.55.52.88]:29122 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934301AbeAXQ5s (ORCPT ); Wed, 24 Jan 2018 11:57:48 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,408,1511856000"; d="scan'208";a="26021894" Subject: Re: [PATCH 2/2] free_pcppages_bulk: prefetch buddy while not holding lock To: Mel Gorman , Aaron Lu References: <20180124023050.20097-1-aaron.lu@intel.com> <20180124023050.20097-2-aaron.lu@intel.com> <20180124164344.lca63gjn7mefuiac@techsingularity.net> Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Huang Ying , Kemi Wang , Tim Chen , Andi Kleen , Michal Hocko , Vlastimil Babka From: Dave Hansen Message-ID: <148a42d8-8306-2f2f-7f7c-86bc118f8ccd@intel.com> Date: Wed, 24 Jan 2018 08:57:43 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180124164344.lca63gjn7mefuiac@techsingularity.net> Content-Type: text/plain; charset=iso-8859-15 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 01/24/2018 08:43 AM, Mel Gorman wrote: > I'm less convinced by this for a microbenchmark. Prefetch has not been a > universal win in the past and we cannot be sure that it's a good idea on > all architectures or doesn't have other side-effects such as consuming > memory bandwidth for data we don't need or evicting cache hot data for > buddy information that is not used. I had the same reaction. But, I think this case is special. We *always* do buddy merging (well, before the next patch in the series is applied) and check an order-0 page's buddy to try to merge it when it goes into the main allocator. So, the cacheline will always come in. IOW, I don't think this has the same downsides normally associated with prefetch() since the data is always used.