From patchwork Sat Apr 17 04:35:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muchun Song X-Patchwork-Id: 12209537 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA3D4C433B4 for ; Sat, 17 Apr 2021 04:38:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 76CFC611AC for ; Sat, 17 Apr 2021 04:38:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 76CFC611AC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=bytedance.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1A33F6B0078; Sat, 17 Apr 2021 00:38:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 17A726B007B; Sat, 17 Apr 2021 00:38:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0423D6B007D; Sat, 17 Apr 2021 00:38:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0178.hostedemail.com [216.40.44.178]) by kanga.kvack.org (Postfix) with ESMTP id DF5236B0078 for ; Sat, 17 Apr 2021 00:38:43 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id A19878248047 for ; Sat, 17 Apr 2021 04:38:43 +0000 (UTC) X-FDA: 78040603326.01.1C6A49E Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by imf26.hostedemail.com (Postfix) with ESMTP id 3E77040002C6 for ; Sat, 17 Apr 2021 04:38:38 +0000 (UTC) Received: by mail-pj1-f41.google.com with SMTP id u14-20020a17090a1f0eb029014e38011b09so10826403pja.5 for ; Fri, 16 Apr 2021 21:38:43 -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=uQtbD7P4vc1vn6sj+rqk5iopinYS+ejCLWKURjwvog0=; b=b5xz3eTkB17OddKFPj9hsXB5jtbQcup9TatoeWEFMiLXgVOzdU/wufc+cbr67DMZbj pcL65OQ+PfpKe9nyEAdQ7pJwBauH6prg0T52NdN7LIVPLXlgnhRwD9J7C64wFliCY02C vOpWyJq/xqMrXg+v7VrKmwAysRwv1yXube8PuOhJKdy3v6ZRt1VK9Q6oNo5WjwGkznCw 1MCvHnf18yaeW9ZHhowTtnu/aT0mYYIWc1UpD54stMe+sYVN+mkwS+Zb81hLvNz+cXD9 6iImyuGI6UO+plKqcv/GGIed7d4nrLA/Z5ytpzOJZPncUXhLFopRtKdXO15m6t28SelW u3qA== 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=uQtbD7P4vc1vn6sj+rqk5iopinYS+ejCLWKURjwvog0=; b=KfrxNev+T0B9nqnR5prii/YXcKMk6plW0GUveJmsXdsaqIcMs6+h84t23x7ryh+cpt /KfFYkZRpgB9UQvkfz+Akgjanb7I/ey+KYeawkPL3U1shSfail4nqt/mh56ABaATxGUi mI4FuqxCmG3FuBwamUjPWPFI0EqF3uRqL++NzxPRRCgHxiczGkP3VOGstArs+Ky/WwVd YEBcs83jO/krhng+dQ23qaxtxlSyd79MTTQK68qvkJlVgswKfi+tj2t4g4v5AExGHBUF zQONCdxuimC9Y18bJis0bZ4VNhprxX5jIb6jPKu6mpSCf9R1ki9zUVAbo15wtC9Uon26 Ollg== X-Gm-Message-State: AOAM531+Xp4pj5GfL1TizuLUV4lrMTXFP341sc443aHYxVIYHiKKLUxJ biuMFSnlSDW0EQk8dvC/4gC+Iw== X-Google-Smtp-Source: ABdhPJy8VZmbHWqkDJIrzx05dg1KyMDeoaA6atPoRgpSAyr6k02STX0M9UPOZ/Gg1bLONaZEENhGhg== X-Received: by 2002:a17:90a:c81:: with SMTP id v1mr12749439pja.23.1618634322480; Fri, 16 Apr 2021 21:38:42 -0700 (PDT) Received: from localhost.bytedance.net ([139.177.225.228]) by smtp.gmail.com with ESMTPSA id w21sm7064775pjy.21.2021.04.16.21.38.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Apr 2021 21:38:42 -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, Muchun Song , Michal Hocko Subject: [PATCH v3 8/8] mm: vmscan: remove noinline_for_stack Date: Sat, 17 Apr 2021 12:35:38 +0800 Message-Id: <20210417043538.9793-9-songmuchun@bytedance.com> X-Mailer: git-send-email 2.21.0 (Apple Git-122) In-Reply-To: <20210417043538.9793-1-songmuchun@bytedance.com> References: <20210417043538.9793-1-songmuchun@bytedance.com> MIME-Version: 1.0 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 3E77040002C6 X-Stat-Signature: g4174d94ifattx8npk5rqgxyuubpihk9 Received-SPF: none (bytedance.com>: No applicable sender policy available) receiver=imf26; identity=mailfrom; envelope-from=""; helo=mail-pj1-f41.google.com; client-ip=209.85.216.41 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1618634318-344412 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: 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 Acked-by: Johannes Weiner Acked-by: Roman Gushchin Reviewed-by: Shakeel Butt Acked-by: Michal Hocko --- mm/vmscan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 2bc5cf409958..2d2727b78df9 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2014,8 +2014,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); @@ -2095,7 +2095,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) {