From patchwork Fri Oct 5 08:10:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun KS X-Patchwork-Id: 10627523 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 49AAB174A for ; Fri, 5 Oct 2018 08:10:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 407C829252 for ; Fri, 5 Oct 2018 08:10:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3445729257; Fri, 5 Oct 2018 08:10:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C711529252 for ; Fri, 5 Oct 2018 08:10:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 62C176B000C; Fri, 5 Oct 2018 04:10:25 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 543C56B0010; Fri, 5 Oct 2018 04:10:25 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 25BB56B000D; Fri, 5 Oct 2018 04:10:25 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by kanga.kvack.org (Postfix) with ESMTP id D846F6B000C for ; Fri, 5 Oct 2018 04:10:24 -0400 (EDT) Received: by mail-pl1-f198.google.com with SMTP id f59-v6so7295935plb.5 for ; Fri, 05 Oct 2018 01:10:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=qHXP3NcYstB6MFsCsD+xzW1ExB+LfhN6o50KTDhaKlA=; b=SWlV4V6ZnS4QaTZt7hKgZ45+W41Tt7D44+f6gdQXVw792HTG2RFp7pYMMZNenzxBDd dkbBsMTshe3oVI2M3D/3nTirl5yvGjqASKOL3rBjIQa6AGAIighWQx8t8AOQoSdDklA7 eW6jy+LcToHTPWrvfrUSW0N0Oa5I4qSs1wxrMaUsweQ7GjxdqSznojQ9du09g08IpM02 8Grsn7HVkOm68kkn0ibBP8EoMKfeK8BLTkK+QIAoWCw3bVUxKBwn2/yP+XK5zmDuam2g +3k4NtQgB0D7LT9Tg8qV/5kcGGRlJ9bnX7v0LHpzmmk/FtwVwQm3jhMppa+c6ihygM52 fbVg== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of arunks@qualcomm.com designates 103.229.18.197 as permitted sender) smtp.mailfrom=arunks@qualcomm.com X-Gm-Message-State: ABuFfogJrrSx25sW52GXBmCb5qMUpCT3GDAF2um2cPt+0aPoQEJ+O617 ZkNk28C8d9J4cWF7BtFIm2qCr+hdHWyI1SzCABGty6owvB2h5yFb+eA7NP1LjvqYZk7cmzad3NZ C6yTOvc9xgUoatk+WbkzKBrp1haDnmKS4Vcjv6a6UZfgkCfMI626iYXMA2hgUgWU= X-Received: by 2002:a17:902:2:: with SMTP id 2-v6mr10612654pla.178.1538727024577; Fri, 05 Oct 2018 01:10:24 -0700 (PDT) X-Google-Smtp-Source: ACcGV629DBXwMUu4gq0smUpkRH1W5ZXJFtudbWylf+KAecoDLm49vGgCFZkjWxasckwrnvEyiIHZ X-Received: by 2002:a17:902:2:: with SMTP id 2-v6mr10612595pla.178.1538727023962; Fri, 05 Oct 2018 01:10:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538727023; cv=none; d=google.com; s=arc-20160816; b=aDipnkMFrNLdORKyH9giCQPg/g5PUrIKLG3UOp6MFuqptTIAi539x7+2npod1XuCqA F7T7KiwI3uvEwP60UnIeEY1OvpsJmnLrrFpaZ3MUaSTqrNrDaX9e6IWha2rwfM0+F96j kf8EwlITH/cerZNAE4p/joQy0dI1Cv5Qn+rWEFfipz9PoxsFNhaNgWSrhvvrVZb1qFxl x0h6AgKzioiHVi7IWq+TQ3erO5aoBSG1asnyDI7cTHHatNJ4bqGnXuD3vUXjO11xUzAp OdpjWVeFatR0PJhy9pWf2MFcOl3IzkN5ZgUiqyUZEUuu+QkfISXF+1cunUGl8Xdq8FNN Medw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=qHXP3NcYstB6MFsCsD+xzW1ExB+LfhN6o50KTDhaKlA=; b=QD+hYZQQiUFGsF+QpPMQyXdwnqGalYELGPVEKdE4nKrLhh04kPP9IKFpC9EdVFZ3PF SL2MnbwstCrhsd1mPzTYa+VC2/Uk87xUVnnUjbXEw+FbqDddsD+K0DAP7UhEceQ5u2Mm agxg2ml7RaDyiuwS9p6PP63hz/kmlihse1AZbfAzmoMusO+YP1Km2io17yfzHq4VbmzF F6leW+ESrAtrV7QKwX11b/pNdleWr1w7eOvPZeUeifIk4AESwpzcfkNcfkHomk+1dPM4 r9LTKj/TcT7TZ/vI44SgSa8QRy1cu8tdw1f2Sz0+LJG0ByAlYa3KnTQ/IdgWyekTCfrR 6DXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of arunks@qualcomm.com designates 103.229.18.197 as permitted sender) smtp.mailfrom=arunks@qualcomm.com Received: from alexa-out-blr-01.qualcomm.com (alexa-out-blr-01.qualcomm.com. [103.229.18.197]) by mx.google.com with ESMTPS id n24-v6si7546760pff.136.2018.10.05.01.10.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Oct 2018 01:10:23 -0700 (PDT) Received-SPF: pass (google.com: domain of arunks@qualcomm.com designates 103.229.18.197 as permitted sender) client-ip=103.229.18.197; Authentication-Results: mx.google.com; spf=pass (google.com: domain of arunks@qualcomm.com designates 103.229.18.197 as permitted sender) smtp.mailfrom=arunks@qualcomm.com X-IronPort-AV: E=Sophos;i="5.54,343,1534789800"; d="scan'208";a="236081" Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by alexa-out-blr-01.qualcomm.com with ESMTP/TLS/AES256-SHA; 05 Oct 2018 13:40:22 +0530 X-IronPort-AV: E=McAfee;i="5900,7806,9036"; a="1466215" Received: from blr-ubuntu-104.ap.qualcomm.com (HELO blr-ubuntu-104.qualcomm.com) ([10.79.40.64]) by ironmsg02-blr.qualcomm.com with ESMTP; 05 Oct 2018 13:40:22 +0530 Received: by blr-ubuntu-104.qualcomm.com (Postfix, from userid 346745) id 05F742391; Fri, 5 Oct 2018 13:40:20 +0530 (IST) From: Arun KS To: 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, mhocko@suse.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 Cc: vatsa@codeaurora.org, vinmenon@codeaurora.org, getarunks@gmail.com, Arun KS Subject: [PATCH v5 2/2] mm/page_alloc: remove software prefetching in __free_pages_core Date: Fri, 5 Oct 2018 13:40:06 +0530 Message-Id: <1538727006-5727-2-git-send-email-arunks@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1538727006-5727-1-git-send-email-arunks@codeaurora.org> References: <1538727006-5727-1-git-send-email-arunks@codeaurora.org> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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. Suggested-by: Dan Williams Signed-off-by: Arun KS Acked-by: Vlastimil Babka --- 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);