Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp264pxb; Wed, 14 Apr 2021 08:05:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzh3yL4WCmZ7rEGAG5hcJbh4gjGGtE7Iqdh0P43Cv1Ube2nzRMUH26OWsDhoXoQ2reu0na X-Received: by 2002:a05:6402:1103:: with SMTP id u3mr40892905edv.205.1618412746978; Wed, 14 Apr 2021 08:05:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618412746; cv=none; d=google.com; s=arc-20160816; b=dCAtorY795h/kixuGodPvWSfVYPVRXZjSB2tXhsVLVxNt6UtE9+7RcLMowRbrNe+yv nnUjBwD/Y7LJiSnEuqv2jQAdBZM3lAj7HJ9v0TjM/aH/WNBh7TnhJEOrl2EmggAqbQB4 3PIeP3fydzieIChSYYd3PAfoGIL4BWxoNia47X+MezCepzaTuycp3fWboMhGWHwc/uJg OJ2tJFIQdZqovSgDyItp87lzR9osNW1CWD4Ww+9p14NsZNMlVqYpLwLYT//lsxXy47Xx 7vWSi1Y1EUHPCu3mE/OBXx7kQeWeiOMA20jci8Twv+0SnWEXzrapW8BDm76rFS+UJRBv S13A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=05qnuH1nbbTYL5zFdv5eMMmudj0mqycIJlXy8sYIrAo=; b=O4UgvAkyWYnWSN1yUzneNvumSgvJXKob+r+2j01dvNpvrL0k6EZu9LW/qLN6yK3Aa+ XmrB2VrnLcAqJSzHXhrdl5Su82zuBJl4B3w1ohWZZJvhzlgawIKXne47YgQh8Q0aZuGL vkkDtDw1B8Xhvw+o1jCX2+2vnaPyqRvTs2w4R7A2VVOYAfMunTnRARTKDKEuMe/ImLRc Qwj3AXT0idqu0D47p1j61p7gc6H1BdIt5xMHGwV5ebU164CVe/FXQsUHCitXmOzGVmLW 1MvwjFep4pl153eEEmstq9+ZkNk8mpbBklgrNWficwe0nnNV7fHXXJ/dLv81b+7WXNTz alUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=oyjmC6he; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y23si12682978ejp.249.2021.04.14.08.05.00; Wed, 14 Apr 2021 08:05:46 -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=@suse.com header.s=susede1 header.b=oyjmC6he; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236723AbhDNJqf (ORCPT + 99 others); Wed, 14 Apr 2021 05:46:35 -0400 Received: from mx2.suse.de ([195.135.220.15]:59796 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233066AbhDNJqb (ORCPT ); Wed, 14 Apr 2021 05:46:31 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1618393569; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=05qnuH1nbbTYL5zFdv5eMMmudj0mqycIJlXy8sYIrAo=; b=oyjmC6heHUrWLTxImm+JHiXprN8BqhbDxcZrY2ANR1FvvTRXP05xLiO5H4ZMbyA1dDBsbS YRaCHLlvV20KO2WOZhA1cXL5kJyh0zofhzd22NO/P9/iIxPnaceqjIEnncQpHtik4Gp3+n XWaYWpCGkELA+bQIbU21wcemyqoDjac= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 76B44ABB3; Wed, 14 Apr 2021 09:46:09 +0000 (UTC) Date: Wed, 14 Apr 2021 11:46:08 +0200 From: Michal Hocko To: Muchun Song Cc: guro@fb.com, hannes@cmpxchg.org, akpm@linux-foundation.org, shakeelb@google.com, vdavydov.dev@gmail.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, duanxiongchun@bytedance.com, fam.zheng@bytedance.com Subject: Re: [PATCH 7/7] mm: vmscan: remove noinline_for_stack Message-ID: References: <20210413065153.63431-1-songmuchun@bytedance.com> <20210413065153.63431-8-songmuchun@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210413065153.63431-8-songmuchun@bytedance.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 13-04-21 14:51:53, Muchun Song wrote: > 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 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 -- Michal Hocko SUSE Labs