From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.5 required=3.0 tests=INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 80873C4CED1 for ; Fri, 4 Oct 2019 08:16:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4F19E2133F for ; Fri, 4 Oct 2019 08:16:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F19E2133F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D7D7B6B0003; Fri, 4 Oct 2019 04:16:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D2DDF8E0003; Fri, 4 Oct 2019 04:16:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C42556B000A; Fri, 4 Oct 2019 04:16:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0137.hostedemail.com [216.40.44.137]) by kanga.kvack.org (Postfix) with ESMTP id 9C6D96B0003 for ; Fri, 4 Oct 2019 04:16:15 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 52C1F75A4 for ; Fri, 4 Oct 2019 08:16:15 +0000 (UTC) X-FDA: 76005394710.07.snail25_8de07ab2cd658 X-HE-Tag: snail25_8de07ab2cd658 X-Filterd-Recvd-Size: 3386 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf26.hostedemail.com (Postfix) with ESMTP for ; Fri, 4 Oct 2019 08:16:14 +0000 (UTC) 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 50119AD22; Fri, 4 Oct 2019 08:16:13 +0000 (UTC) Date: Fri, 4 Oct 2019 10:16:12 +0200 From: Michal Hocko To: Yang Shi Cc: mgorman@techsingularity.net, hannes@cmpxchg.org, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: vmscan: remove unused scan_control parameter from pageout() Message-ID: <20191004081612.GB9578@dhcp22.suse.cz> References: <1570124498-19300-1-git-send-email-yang.shi@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1570124498-19300-1-git-send-email-yang.shi@linux.alibaba.com> User-Agent: Mutt/1.10.1 (2018-07-13) 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: On Fri 04-10-19 01:41:38, Yang Shi wrote: > Since lumpy reclaim was removed in v3.5 scan_control is not used by > may_write_to_{queue|inode} and pageout() anymore, remove the unused > parameter. I haven't really checked whether it was the lumpy reclaim removal but it is clearly not used these days. > Cc: Mel Gorman > Cc: Johannes Weiner > Cc: Michal Hocko > Signed-off-by: Yang Shi Acked-by: Michal Hocko Thanks! > --- > mm/vmscan.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/mm/vmscan.c b/mm/vmscan.c > index e5d52d6..17489b8 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -774,7 +774,7 @@ static inline int is_page_cache_freeable(struct page *page) > return page_count(page) - page_has_private(page) == 1 + page_cache_pins; > } > > -static int may_write_to_inode(struct inode *inode, struct scan_control *sc) > +static int may_write_to_inode(struct inode *inode) > { > if (current->flags & PF_SWAPWRITE) > return 1; > @@ -822,8 +822,7 @@ static void handle_write_error(struct address_space *mapping, > * pageout is called by shrink_page_list() for each dirty page. > * Calls ->writepage(). > */ > -static pageout_t pageout(struct page *page, struct address_space *mapping, > - struct scan_control *sc) > +static pageout_t pageout(struct page *page, struct address_space *mapping) > { > /* > * If the page is dirty, only perform writeback if that write > @@ -859,7 +858,7 @@ static pageout_t pageout(struct page *page, struct address_space *mapping, > } > if (mapping->a_ops->writepage == NULL) > return PAGE_ACTIVATE; > - if (!may_write_to_inode(mapping->host, sc)) > + if (!may_write_to_inode(mapping->host)) > return PAGE_KEEP; > > if (clear_page_dirty_for_io(page)) { > @@ -1396,7 +1395,7 @@ static unsigned long shrink_page_list(struct list_head *page_list, > * starts and then write it out here. > */ > try_to_unmap_flush_dirty(); > - switch (pageout(page, mapping, sc)) { > + switch (pageout(page, mapping)) { > case PAGE_KEEP: > goto keep_locked; > case PAGE_ACTIVATE: > -- > 1.8.3.1 -- Michal Hocko SUSE Labs