From patchwork Sun Dec 1 01:55:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 11268383 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CE490112B for ; Sun, 1 Dec 2019 01:55:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9216F208E4 for ; Sun, 1 Dec 2019 01:55:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="NKnlCYB2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9216F208E4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 841496B0328; Sat, 30 Nov 2019 20:55:30 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 7CB5D6B032A; Sat, 30 Nov 2019 20:55:30 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6E1156B032B; Sat, 30 Nov 2019 20:55:30 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0028.hostedemail.com [216.40.44.28]) by kanga.kvack.org (Postfix) with ESMTP id 521086B0328 for ; Sat, 30 Nov 2019 20:55:30 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 06EF3181AEF0B for ; Sun, 1 Dec 2019 01:55:30 +0000 (UTC) X-FDA: 76214905620.18.walk28_2ffb35ad5475f X-Spam-Summary: 2,0,0,c2df013af3926a54,d41d8cd98f00b204,akpm@linux-foundation.org,:akpm@linux-foundation.org:hannes@cmpxchg.org::mgorman@techsingularity.net:mhocko@suse.com:mm-commits@vger.kernel.org:rientjes@google.com:torvalds@linux-foundation.org:yang.shi@linux.alibaba.com,RULES_HIT:41:355:379:800:960:966:967:968:973:988:989:1260:1263:1345:1381:1431:1437:1534:1542:1711:1730:1747:1777:1792:2196:2199:2393:2525:2559:2563:2682:2685:2859:2902:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3353:3865:3868:3870:3871:3872:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:4385:5007:6261:6653:7576:7875:7903:9025:9391:9545:10004:10913:11026:11658:11914:12043:12048:12296:12297:12438:12517:12519:12555:12679:12783:12986:13255:14096:14181:14721:14849:21060:21080:21433:21451:21627:21819:21939:30054,0,RBL:error,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:3,LUA_SUMMARY:none X-HE-Tag: walk28_2ffb35ad5475f X-Filterd-Recvd-Size: 3501 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Sun, 1 Dec 2019 01:55:29 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A9391208C3; Sun, 1 Dec 2019 01:55:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575165329; bh=hR3yZZQVSJnLXIJ7lYCg4CSCAmuZ/+qQy2gDpXPEf3c=; h=Date:From:To:Subject:From; b=NKnlCYB2rQQIZG94z8YM1NjUadKBJVj2wIICvQKD/wVbfSzthh9eSI1vNeKFaLhwQ X+pQvyTN+ypYuu1A5w53+p3tcxfxJx6jWrjFQXkihPnMvGEnZrZId1MqXc/rmoOtgt z/psLYCH3feZPCJ+vWQbbwtW7NIKO9QHHEifxZPY= Date: Sat, 30 Nov 2019 17:55:28 -0800 From: akpm@linux-foundation.org To: akpm@linux-foundation.org, hannes@cmpxchg.org, linux-mm@kvack.org, mgorman@techsingularity.net, mhocko@suse.com, mm-commits@vger.kernel.org, rientjes@google.com, torvalds@linux-foundation.org, yang.shi@linux.alibaba.com Subject: [patch 103/158] mm/vmscan.c: remove unused scan_control parameter from pageout() Message-ID: <20191201015528.9S6Ztf0rS%akpm@linux-foundation.org> User-Agent: s-nail v14.8.16 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: From: Yang Shi Subject: mm/vmscan.c: remove unused scan_control parameter from pageout() 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. Link: http://lkml.kernel.org/r/1570124498-19300-1-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Yang Shi Acked-by: David Rientjes Acked-by: Michal Hocko Cc: Mel Gorman Cc: Johannes Weiner Signed-off-by: Andrew Morton --- mm/vmscan.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) --- a/mm/vmscan.c~mm-vmscan-remove-unused-scan_control-parameter-from-pageout +++ a/mm/vmscan.c @@ -775,7 +775,7 @@ static inline int is_page_cache_freeable 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; @@ -823,8 +823,7 @@ typedef enum { * 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 @@ -860,7 +859,7 @@ static pageout_t pageout(struct page *pa } 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)) { @@ -1394,7 +1393,7 @@ static unsigned long shrink_page_list(st * 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: