From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426699AbeCBSJt (ORCPT ); Fri, 2 Mar 2018 13:09:49 -0500 Received: from mx2.suse.de ([195.135.220.15]:57488 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423570AbeCBSJs (ORCPT ); Fri, 2 Mar 2018 13:09:48 -0500 Subject: Re: [PATCH v4 3/3] mm/free_pcppages_bulk: prefetch buddy while not holding lock To: Dave Hansen , Michal Hocko , Aaron Lu Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Huang Ying , Kemi Wang , Tim Chen , Andi Kleen , Mel Gorman , Matthew Wilcox , David Rientjes References: <20180301062845.26038-1-aaron.lu@intel.com> <20180301062845.26038-4-aaron.lu@intel.com> <20180301140044.GK15057@dhcp22.suse.cz> <2433e857-fea7-9af4-d124-538ad17de454@intel.com> From: Vlastimil Babka Message-ID: <787e53b9-20d3-a2df-44fc-ea8c31a6ced3@suse.cz> Date: Fri, 2 Mar 2018 19:08:00 +0100 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: <2433e857-fea7-9af4-d124-538ad17de454@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/02/2018 07:00 PM, Dave Hansen wrote: > On 03/02/2018 09:55 AM, Vlastimil Babka wrote: >> It's even stranger to me. Struct page is 64 bytes these days, exactly a >> a cache line. Unless that changed, Intel CPUs prefetched a "buddy" cache >> line (that forms an aligned 128 bytes block with the one we touch). > > I believe that was a behavior that was specific to the Pentium 4 > "Netburst" era. I don't think the 128-byte line behavior exists on > modern Intel cpus. I remember it on Core 2 something (Nehalem IIRC). And this page suggests up to Broadwell, and it can be disabled. And it's an L2 prefetcher indeed. https://software.intel.com/en-us/articles/disclosure-of-hw-prefetcher-control-on-some-intel-processors From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f197.google.com (mail-wr0-f197.google.com [209.85.128.197]) by kanga.kvack.org (Postfix) with ESMTP id C82016B0005 for ; Fri, 2 Mar 2018 13:09:48 -0500 (EST) Received: by mail-wr0-f197.google.com with SMTP id 5so6878404wrb.15 for ; Fri, 02 Mar 2018 10:09:48 -0800 (PST) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id r4si5088006wrg.527.2018.03.02.10.09.47 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 02 Mar 2018 10:09:47 -0800 (PST) Subject: Re: [PATCH v4 3/3] mm/free_pcppages_bulk: prefetch buddy while not holding lock References: <20180301062845.26038-1-aaron.lu@intel.com> <20180301062845.26038-4-aaron.lu@intel.com> <20180301140044.GK15057@dhcp22.suse.cz> <2433e857-fea7-9af4-d124-538ad17de454@intel.com> From: Vlastimil Babka Message-ID: <787e53b9-20d3-a2df-44fc-ea8c31a6ced3@suse.cz> Date: Fri, 2 Mar 2018 19:08:00 +0100 MIME-Version: 1.0 In-Reply-To: <2433e857-fea7-9af4-d124-538ad17de454@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: Dave Hansen , Michal Hocko , Aaron Lu Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Huang Ying , Kemi Wang , Tim Chen , Andi Kleen , Mel Gorman , Matthew Wilcox , David Rientjes On 03/02/2018 07:00 PM, Dave Hansen wrote: > On 03/02/2018 09:55 AM, Vlastimil Babka wrote: >> It's even stranger to me. Struct page is 64 bytes these days, exactly a >> a cache line. Unless that changed, Intel CPUs prefetched a "buddy" cache >> line (that forms an aligned 128 bytes block with the one we touch). > > I believe that was a behavior that was specific to the Pentium 4 > "Netburst" era. I don't think the 128-byte line behavior exists on > modern Intel cpus. I remember it on Core 2 something (Nehalem IIRC). And this page suggests up to Broadwell, and it can be disabled. And it's an L2 prefetcher indeed. https://software.intel.com/en-us/articles/disclosure-of-hw-prefetcher-control-on-some-intel-processors -- 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