Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1117388ybp; Fri, 4 Oct 2019 09:45:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqz2c7aKMNFNzYZYmbYHqaWCrDhviZ7MF6ubuOylChUmK+n7h89yIgmZj7Gj89UjOjSuEoDk X-Received: by 2002:a17:906:7294:: with SMTP id b20mr12982167ejl.216.1570207515787; Fri, 04 Oct 2019 09:45:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570207515; cv=none; d=google.com; s=arc-20160816; b=ikUFnbKdiL52p17jJqcAhhI2BNivnTFoFoVAqMNz3jNm7N9BPMw+ysxbEgrmdLIyDF zz4YQGBCjJe/+l9cPl72qOBw5h0v/LAh1XMR8dXZpvIM9+omVjP064dHu1aZMs2ANkJW 66UITm0DsR5kQ4ov9IEPF7znkALQEvoJkHWyUmX0rsbDN0/AyHvwBAwVnx8wci9HPQcD k0z450U0bcIR6IzTJrT7Aw+XNv3VFK5tMqbayMaetnn0A/8r1vhCzNaNn/IgrtgKynSA +q4vv34qWCvb7KQgMzOYoKbQf0KekUC65+uR2jh3RLA6ftcdweGU2823/iR4iq2PISZH m2Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=B8yV9hjqK0Lvo3C2pdiYuu4fBQgvqdZc1oZmcQp6q90=; b=UXXD5oCcVCcJGk4HuCjB8vNFarR1XPZlENtvpRVVw9PMnr4HR1GSJ29Q3gpzcfrK34 NzvM0CChCsUvFsRiQ7MiMHp/Ixh7nxV/Y+H1nkksSPPzoqLxglK6kWdo6W60n9x/0ihi p9aX8Ym76C/38Wjlz5qaAWn0JanLN7BY/9w1JpuezjzHwihkvqee9VxjCVfhRRyCRspr 1VHMjDrovr+nF1Odx7NHun+/crHTvLG9hFhJgbT4wmbvmDv6Zh1T7BQ/nj0Q6HSJ+Q1U aYvLVDsSO6qcQ09wKLvwfKlFFBe5lF8vUx8mZbkraW5aYdJtA4oCI99asd81v/ErDB7t caKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e13si3730279edr.429.2019.10.04.09.44.52; Fri, 04 Oct 2019 09:45:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729714AbfJDQnn (ORCPT + 99 others); Fri, 4 Oct 2019 12:43:43 -0400 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]:55182 "EHLO out30-130.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727264AbfJDQnn (ORCPT ); Fri, 4 Oct 2019 12:43:43 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R271e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04391;MF=yang.shi@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0Te4gntB_1570207414; Received: from US-143344MP.local(mailfrom:yang.shi@linux.alibaba.com fp:SMTPD_---0Te4gntB_1570207414) by smtp.aliyun-inc.com(127.0.0.1); Sat, 05 Oct 2019 00:43:37 +0800 Subject: Re: [PATCH] mm: vmscan: remove unused scan_control parameter from pageout() To: Michal Hocko Cc: mgorman@techsingularity.net, hannes@cmpxchg.org, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <1570124498-19300-1-git-send-email-yang.shi@linux.alibaba.com> <20191004081612.GB9578@dhcp22.suse.cz> From: Yang Shi Message-ID: Date: Fri, 4 Oct 2019 09:43:32 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20191004081612.GB9578@dhcp22.suse.cz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/4/19 1:16 AM, Michal Hocko wrote: > 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. It was removed by commit c53919adc045bf803252e912f23028a68525753d ("mm: vmscan: remove lumpy reclaim"). > >> 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