Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1902387imu; Tue, 6 Nov 2018 06:11:15 -0800 (PST) X-Google-Smtp-Source: AJdET5eVXRxtQTa/0JF9Ryo8Wv8A/7XY6mteODSsj3d8x6HybrmjjzwEEzQUTezXaKMSLwPUxhEd X-Received: by 2002:a62:2a04:: with SMTP id q4-v6mr26130691pfq.61.1541513475507; Tue, 06 Nov 2018 06:11:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541513475; cv=none; d=google.com; s=arc-20160816; b=gCim+XLFIl5uCyXIeuWtFcQBovr8TlwpVnyqajcr0gUzzBhj2EekmxLvyk/IIgs7em +It1u74ZQwqceR/jb06BJsOCI6ZAxxAAKiaFrY/nTYAr9GqZY5zJ/HAmIXjhUDSQoJEL 1547aU5T+U/vSrNqza8m8EsPW05niK0zcO4BEDJ00b9h1glwO5LGSSxiWrMKuK0rT74R lBw0rQQNWey7a9PFCTzu3iZN2/Yaptrw9HoiZJTNJ8cQD44bdcUYg13l/ZmLV9STOSa6 AYh+oEwiuyndUjtCM4eT6EhoJyN3JHIuROtr1SBffwyEDepErlUeYVgchPIpJI5wN2Ci yWQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=02f3OUi7F+GzQqlWvMFn3L0W7kDmmy4tvdIHVj4osfM=; b=fYrWh36RUIHrCSlJQtWyoQ9iaVgct5bB4HgI09yOEgbkrobNQ9BJAjuwfaQZX96guj 7iHTosSEbFDHvs0nN//JX47CuzJT/qe/D6ek2tl3d1skxylOta9BMzVh5fEtIytBMJ50 nVMRUDlthWBszuj4dq9TWYn3pS1bGOKQHrmDXg559ij2o24sceEkfzIbHO6vy99nG+Sj hubPGmfS49T5eYGXvJn2hCO0h+RS3M/reKp37IBewkX/pCtimO3tJtsO3/ikDXmIpF2j zYhHaoQExJfpN1qdVwECHfa0rdvzUsLWh3gw+omrj8v4cChwW7yO4FFvJWAq/GeT8AjY p2Nw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l14si10181679pgi.147.2018.11.06.06.10.54; Tue, 06 Nov 2018 06:11:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730682AbeKFXd1 (ORCPT + 99 others); Tue, 6 Nov 2018 18:33:27 -0500 Received: from mx2.suse.de ([195.135.220.15]:38218 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730481AbeKFXd1 (ORCPT ); Tue, 6 Nov 2018 18:33:27 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E599DB68C; Tue, 6 Nov 2018 14:08:01 +0000 (UTC) Date: Tue, 6 Nov 2018 15:08:01 +0100 From: Michal Hocko To: Arun KS Cc: arunks.linux@gmail.com, akpm@linux-foundation.org, vbabka@suse.cz, osalvador@suse.de, linux-kernel@vger.kernel.org, linux-mm@kvack.org, getarunks@gmail.com Subject: Re: [PATCH v6 2/2] mm/page_alloc: remove software prefetching in __free_pages_core Message-ID: <20181106140801.GO27423@dhcp22.suse.cz> References: <1541484194-1493-1-git-send-email-arunks@codeaurora.org> <1541484194-1493-2-git-send-email-arunks@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1541484194-1493-2-git-send-email-arunks@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 06-11-18 11:33:14, Arun KS wrote: > They not only increase the code footprint, they actually make things > slower rather than faster. Remove them as contemporary hardware doesn't > need any hint. I guess I have already asked for that. When you argue about performance then always add some numbers. I do agree we want to get rid of the prefetching because it is just too of an micro-optimization without any reasonable story behind. > Suggested-by: Dan Williams > Signed-off-by: Arun KS > --- > mm/page_alloc.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 7cf503f..a1b9a6a 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -1270,14 +1270,10 @@ void __free_pages_core(struct page *page, unsigned int order) > struct page *p = page; > unsigned int loop; > > - prefetchw(p); > - for (loop = 0; loop < (nr_pages - 1); loop++, p++) { > - prefetchw(p + 1); > + for (loop = 0; loop < nr_pages ; loop++, p++) { > __ClearPageReserved(p); > set_page_count(p, 0); > } > - __ClearPageReserved(p); > - set_page_count(p, 0); > > page_zone(page)->managed_pages += nr_pages; > set_page_refcounted(page); > -- > 1.9.1 -- Michal Hocko SUSE Labs