Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4620864imm; Tue, 9 Oct 2018 02:31:27 -0700 (PDT) X-Google-Smtp-Source: ACcGV60qrBJagoaixZuZAwpQs0coP8/BLP5pL0aEzqKXRAyUAj68w6DOhgKCmJz+VBa5yfUAr+yP X-Received: by 2002:a62:8f:: with SMTP id 137-v6mr28905653pfa.24.1539077487665; Tue, 09 Oct 2018 02:31:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539077487; cv=none; d=google.com; s=arc-20160816; b=Zbqn9D2nWelYYc3lL0BgIs4mVg+v5yHEDynLxgWkEghrenlw+FjOkDrcQ/px5mMW1/ 5WdWHeuQtXQ/5RzlgK7FVXIMP7/Lo9//nxXf9ycrL0Em3UoVWGig4nwEaYRwvtubgoQj iZoVyIHWUO33KWWCjrpPc8YXvvxZZMZ4Dj9VbSLLSu9DnmCPCgICC/ZyWwT7Qo0vMIpB vxKkgoc3M4wp7eNfvL2jAal2Z0YMZXcXbRZsYMKC3tCAv+3D2dabv7+/Q5E8/IkDAiQa 5uimCIwwW6+GbX7Dcx4JUZtW6tKXSZKvCxL2jvt1DnqBn1IK8Q+jZTeE8YgFsLJuseQw In0g== 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=Un+9hDm2ANRzcLWAp3nE4X5A1lEjv1gbAWZHxem4Kx8=; b=IkXBfHckvFiestBvqUk+Vitulm/lZ9zOW9xebsX9Zxwuk+EV5hhX6ayo67B0bvu0Zf k1kfCYCVO4MDOvsBjJ+2sIadOi4zNftq9TsQsFCJuH3T7SulF6bS+CM8JIaZexhZjR43 3N0COEta6pwdYqdl0g9hgJcTLTFhdXFCNQ6iEyLdo7jHJBwQGC3ZbbPC9lIVfD0/Dy7l CdYGy1XcHON0Y2qwS2jhhUzfGSLnUvH5XNF8mvNXQ46tvmE/5eHntgJTipppQS4rxAxZ f/+TdbaYqjVnNMzofOvC0Uzud1IImlfEEql+0TPklJZCr5fVxLWfctXvZWJ74cJ9s4/D BR7Q== 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 j91-v6si21310793pld.228.2018.10.09.02.31.13; Tue, 09 Oct 2018 02:31:27 -0700 (PDT) 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 S1726770AbeJIQqj (ORCPT + 99 others); Tue, 9 Oct 2018 12:46:39 -0400 Received: from mx2.suse.de ([195.135.220.15]:53584 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726722AbeJIQqj (ORCPT ); Tue, 9 Oct 2018 12:46:39 -0400 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 B3DD5AF6A; Tue, 9 Oct 2018 09:30:37 +0000 (UTC) Date: Tue, 9 Oct 2018 11:30:37 +0200 From: Michal Hocko To: Arun KS Cc: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, boris.ostrovsky@oracle.com, jgross@suse.com, akpm@linux-foundation.org, dan.j.williams@intel.com, vbabka@suse.cz, iamjoonsoo.kim@lge.com, gregkh@linuxfoundation.org, osalvador@suse.de, malat@debian.org, kirill.shutemov@linux.intel.com, jrdr.linux@gmail.com, yasu.isimatu@gmail.com, mgorman@techsingularity.net, aaron.lu@intel.com, devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, xen-devel@lists.xenproject.org, vatsa@codeaurora.org, vinmenon@codeaurora.org, getarunks@gmail.com Subject: Re: [PATCH v5 2/2] mm/page_alloc: remove software prefetching in __free_pages_core Message-ID: <20181009093037.GI8528@dhcp22.suse.cz> References: <1538727006-5727-1-git-send-email-arunks@codeaurora.org> <1538727006-5727-2-git-send-email-arunks@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1538727006-5727-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 Fri 05-10-18 13:40:06, 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 agree with the change but it is much better to add some numbers whenever arguing about performance impact. > > 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 7ab5274..90db431 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -1258,14 +1258,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