Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1311915pxf; Fri, 9 Apr 2021 05:34:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPnqUiRYVjhmPjidGAxZ5ddirAAkC3FIVNrSoAlN19cYn+mB3aaSKj6zGG3xNTmjG08ce+ X-Received: by 2002:a17:902:a9c7:b029:e8:de49:6a76 with SMTP id b7-20020a170902a9c7b02900e8de496a76mr13014790plr.63.1617971652428; Fri, 09 Apr 2021 05:34:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617971652; cv=none; d=google.com; s=arc-20160816; b=pPQqXLOyX+3trh6YoyOrsmBgEWLnUWtzKrrjL5T5ZRUN89vZQoCq9mVOt10Eeuk6Nz r6KQNsT+UTFL81jvUFpWkJZcvYrgF6WMW1UwzNrP+UMrSnfD9Zio26ATd+raz2xnGc7g gKlZbsbK4H60Qg06Ghh/3jRRviaLZD56X5kmJ9trZG8SpQPtW9V2vErUOrGtco9cF54p G2IFEyvKBgDWo2+XeTQdFSPnSfxBZxbIWFbpbEHa7bZ1ESwrhWqU+5PlabzGA3c2uUCi 0eiWJlZDRkP7eaqwbuPNwBajSFlLcGxbeDlU0k6F1+2aNiG+VePmV0QUIwh6Y4Q1J3oo rRmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AGnIcRUphb33Z52wrBzQRy2lP1/tCopQL4vrXFnFrmI=; b=PBZGkUZLtvAyv5WO2DBbORW2IPE7LXroSSfloW5Ba1EqS16CGu9M1+yp1j0n+rvFEj l5OWunBitPp3qPp/nsiQ65mkDwdtB0BdcG9pvOySKO9H1ALpTV6yiXZEJCy4gHuqUV4X LmCJf/0FafsHm3JuT6fKyiqUM7lVuGRqZItLqrnGbKFDGXkdyfBlSBZud0/3UkTwq1LG 8w23eBlIfFY2UcUnQQfPlgI+in/dk6mmxdSQXZOLVkzZozeCKf/eZ7F15EM256CPvlmQ MA/tyUf1VwSCt0Rd2H/nZF5scns0j7KBCVlOSzw8VtULoZTWuJHNHZx1dOoH8y1M87B3 w6FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=S0AxdzbO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ba12si2930032plb.87.2021.04.09.05.34.00; Fri, 09 Apr 2021 05:34:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=S0AxdzbO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233687AbhDIMdG (ORCPT + 99 others); Fri, 9 Apr 2021 08:33:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231819AbhDIMc7 (ORCPT ); Fri, 9 Apr 2021 08:32:59 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32EF4C061761 for ; Fri, 9 Apr 2021 05:32:45 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id bg21so2847018pjb.0 for ; Fri, 09 Apr 2021 05:32:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AGnIcRUphb33Z52wrBzQRy2lP1/tCopQL4vrXFnFrmI=; b=S0AxdzbO4aXq30Vi35yMmb1Li/r3E9lW60nwWLlDMZRGKCvNrSuk9f6rMufTdhOyqF uGM5dcZ1TcR1fLjFFyIpJRKkjjDhlTNaqc5Ies/YjdlKakn02dWQ1V9zj1k2tXWloykp KcViVWqi0wDeQZoFgkHypenGAb2l/C8qnB/RTFfInSkCaTPj860ShomNWih9FAhRvtwR dUQj3pch7N74sEvRDw5muZ+tU8TCL9Ks18Tp/EOpqWvNbEPBoKAHXwT5/HHUz3MIeEvg UKnRw93yBCLGcNZUgOQr80Hfj3NdocAyk/VRGGBHm0O+YugvFmpwgS/3TWpCtBReAJON gv4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AGnIcRUphb33Z52wrBzQRy2lP1/tCopQL4vrXFnFrmI=; b=GLZ6qXvwePUiWP1/7sLh7X8IUmCGp7smCVg78oH5ipe6m6iGXuGLchh59Nzce1NN9o AnObDhs7TqPj/Fd6UMl0oOjP3VsZ6fNhcULpwckUPYTIRZ8WmGrGwL4QQJpw20oRoOPH MdZK4Z3MfKXyiemgtP3JJUGElP2Vc4byTbr1e787XK9eK0k04Xav9w/4VarHd9tcZY3a 3NIAYxG5rC7snDSm3k2bpdqI47WNYGBh8WLBS61NkFv7le7SwVkKIsMsMLykJiibcsks LGaT3yFEKOyY6I+pvVFhwiNgzUstklsy1WHJBKTbzjCWcnHyxcbwlL/5KSJheEJx5pRv fEoQ== X-Gm-Message-State: AOAM531IUdJXoAJwzr3Ur/ffx02IFltJQAtGa/wH2mcvAitsfOddgtoa NvJcjRBFS6MKd9LmW6sWfN6YJA== X-Received: by 2002:a17:90a:de89:: with SMTP id n9mr13461586pjv.180.1617971564855; Fri, 09 Apr 2021 05:32:44 -0700 (PDT) Received: from localhost.localdomain ([139.177.225.243]) by smtp.gmail.com with ESMTPSA id t3sm2167785pfg.176.2021.04.09.05.32.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Apr 2021 05:32:44 -0700 (PDT) From: Muchun Song To: guro@fb.com, hannes@cmpxchg.org, mhocko@kernel.org, akpm@linux-foundation.org, shakeelb@google.com, vdavydov.dev@gmail.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, duanxiongchun@bytedance.com, fam.zheng@bytedance.com, bsingharora@gmail.com, shy828301@gmail.com, alex.shi@linux.alibaba.com, Muchun Song Subject: [RFC PATCH v2 09/18] mm: vmscan: remove noinline_for_stack Date: Fri, 9 Apr 2021 20:29:50 +0800 Message-Id: <20210409122959.82264-10-songmuchun@bytedance.com> X-Mailer: git-send-email 2.21.0 (Apple Git-122) In-Reply-To: <20210409122959.82264-1-songmuchun@bytedance.com> References: <20210409122959.82264-1-songmuchun@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The noinline_for_stack is introduced by commit 666356297ec4 ("vmscan: set up pagevec as late as possible in shrink_inactive_list()"), its purpose is to delay the allocation of pagevec as late as possible to save stack memory. But the commit 2bcf88796381 ("mm: take pagevecs off reclaim stack") replace pagevecs by lists of pages_to_free. So we do not need noinline_for_stack, just remove it (let the compiler decide whether to inline). Signed-off-by: Muchun Song --- mm/vmscan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 64bf07cc20f2..e40b21298d77 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2015,8 +2015,8 @@ static int too_many_isolated(struct pglist_data *pgdat, int file, * * Returns the number of pages moved to the given lruvec. */ -static unsigned noinline_for_stack move_pages_to_lru(struct lruvec *lruvec, - struct list_head *list) +static unsigned int move_pages_to_lru(struct lruvec *lruvec, + struct list_head *list) { int nr_pages, nr_moved = 0; LIST_HEAD(pages_to_free); @@ -2096,7 +2096,7 @@ static int current_may_throttle(void) * shrink_inactive_list() is a helper for shrink_node(). It returns the number * of reclaimed pages */ -static noinline_for_stack unsigned long +static unsigned long shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec, struct scan_control *sc, enum lru_list lru) { -- 2.11.0