Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp585859ybp; Fri, 4 Oct 2019 01:31:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqyA9ohchZ1KIffB1iKxG2cycF1Y6qx1JQHT1bfvt9Pj0d0q8i0ANvkMID6NmevoX6SGgWu+ X-Received: by 2002:a50:91d8:: with SMTP id h24mr13733289eda.61.1570177889321; Fri, 04 Oct 2019 01:31:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570177889; cv=none; d=google.com; s=arc-20160816; b=kxm54chzJ4cPFFrCxVvNZlNBtO+b0VJtKX8rj1eGw7Vy+/LR/NjcNOwhJ7oICs/0oi G3oDkLSkUl4WOJGmy6FPhakwrovDWebf9Xf2NTI9MNmSjU2wud0Fnz2TKQdJmLxfdEFM lKwaz94xa8hFvHTX0I3Pbt4x1K3lQSgfRCkvAJBToboZePyjc/bfUe1yvJi/L6ZTLLAj f8hvi8WlGAIVFEWtK+Y9qNb0mlqkmEibfocVt0n3LiXPEHJ0324B09mdL4c5c+qCMTN2 VXjHJQ9X15Hw8gQtQsZ2dsJGRanqYpypR75fSoceker2r6BUmeCbjkcNPpo7xsa4YIs+ zqcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=M4Uo9yqEgOKQSc1T0AeSraNNiwcAEtsGZoYfqZe09BQ=; b=vV/yWD/6Pr11fz8x9IAApY8X9XkcVbRzHKY55+l6WrSgkf4YbbQeTIjE2rHuGgQPBx DPWupii3z2M5kg3l2d76H4mMu5U0gjwdmqNFupXBQDi9Y5nIQEJoNgUDhpgAeWbP20zr mRYy99+EzMIyjB3GRjAwAx32ielaxnUtqvKV8D3DdfGXn5E7yuUPfi05W00gBWSunnHb mS7ux7+Kr/YEC4czGqoP9PvRO5mFQbvhBpT1Ub4hW6YA2uTWHDawfol2KM6m3GYEOsTk /losOnbnemC4k+Z83QJbHcD/YPuC+vcS4qcRyWrN1YPL4+gr/ZRU9HegCxac7whmadEn jD+Q== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9si1429418ejx.438.2019.10.04.01.31.05; Fri, 04 Oct 2019 01:31:29 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730750AbfJDIQP (ORCPT + 99 others); Fri, 4 Oct 2019 04:16:15 -0400 Received: from mx2.suse.de ([195.135.220.15]:37652 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725730AbfJDIQP (ORCPT ); Fri, 4 Oct 2019 04:16:15 -0400 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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