Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9847128ybi; Wed, 10 Jul 2019 18:27:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsECVb9U7jywxVJAZMEa0cpFcf9AC+xQ7ZsmGtC63L9ZwaWPQIYpI5HYh41oMHi6SI2Mh3 X-Received: by 2002:a63:b1d:: with SMTP id 29mr1375397pgl.103.1562808434001; Wed, 10 Jul 2019 18:27:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562808433; cv=none; d=google.com; s=arc-20160816; b=HUR6nvDXjf3/boLCzYHFeglExUvV4Le2qd2y1Wk0G7RYLAzu0aseGYggzYMCKorVYP 8AJwwLinCQPUvRkEFFauBJSZwB2UMauCDhgJCGyMEpsjsdwOcbq9CaVGn4HZIdkizc/0 nhmnt4gk32OEV05NmrZn3H3yGu6o+wIRJ7MkMDOGxXrfbNOkHNb3ohSXvhZmypNrfYVv HHLlGty3cCJIPuxkkHDup2dlZxQ1VNQUZ0O/OTUhqQttG4lKXG74Y9i//Qcqe/KYyCFw s5n1kr+dcg/F+BPAqsPACm0osk3FK/byNBnQ6WvYKpa2JBgL7g7w8H17qRs/B1muniOK o9dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ytlBWMtHJbXM/Fdr0Dw34etRRl/dA5ETgcx25kBAXTE=; b=WZSa3MigsfBFGNL3wz1IZI4KZnQ9+eggu9aAnOPO8CQHbMGboUzQou7jqPFlconaSw FdRAzBWTkt5kgelxok1QQqfxdF53pQa3/r9iAFsM4Aot7ln/YAeodwz6+sScK/y8u9I8 bw0tPGrD7d6nub3Xl/8nVtTag6jkoMRpc4+9M3TyxH2kc7f4NfMMO7SltfffxFwImv18 /hsl+gkpV+CXDyRtVQAhM08OMdoGYZjtluD1emEE1ZkF0TT3LWbtLT/sWp4nyakwjugq P8ZwUFG1zXV/Erc8Su0+CibeC+cUWrKC+pJ8cQ3wSO2FOChWV4G7RkDu9TKfTMmZHhly CQ6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=scmCxifB; 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 l6si1243735pgr.378.2019.07.10.18.26.58; Wed, 10 Jul 2019 18:27:13 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=scmCxifB; 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 S1727940AbfGKBZx (ORCPT + 99 others); Wed, 10 Jul 2019 21:25:53 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:38535 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727906AbfGKBZv (ORCPT ); Wed, 10 Jul 2019 21:25:51 -0400 Received: by mail-pg1-f195.google.com with SMTP id z75so2077603pgz.5; Wed, 10 Jul 2019 18:25:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ytlBWMtHJbXM/Fdr0Dw34etRRl/dA5ETgcx25kBAXTE=; b=scmCxifB8StBEnmKJK3AL4Hjoo98qxRNoQ8Fk3T8R9JuJObsuBeHZD00xDTlmTG4lh BzuC9uPW4vFnIP4tbOwbF3cqX08QGsRYfP2p+KEsQG5xIuaSSWt7oxSdFKZjc/ofymfx qw8C+OcxbqqZk22YmTmHhF8Mp/eKpdhQi+NAjVTUMZiePcw0acmeucdEhdmeeE+aiX3n gRwdmJpdShHc94ZVrAYoPS7XXlnnyC6tXr4cQj2bhACNORepwXVk2b2tOmJO2srqMWit qXgqphbd2UH5Wt76dnSGGMN6OabavY6+qQ2dpOslFYo1NQUYJE5KTS3xQ0D5pJ3G5Cow U1JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ytlBWMtHJbXM/Fdr0Dw34etRRl/dA5ETgcx25kBAXTE=; b=AA05vU76d2FRMVphcLF6N3SZKbn921+zBXQUUB1cm07HYP1l8sJ3TykzLR1ecpSI6y nQt4e58ULd49n9vmpNsSnydkUbGEHCH1N2WN4QK6/LsMRTmv5iH3BhdePrhtAv1shsw/ VhS1p92Cwt72XxL2MB04jiMGwNuiEw0NZtxJjAGSg7v7zS5EJTBcXC4sf87K0qx8+/Wj /S8+jngZDT7XD27eUV80xhSnIYqOLUCg6R69UglUy0+EXjxCQwWnydPe+glTwK+tGgQ1 wHAhsf09Kdi3408ZaggUVjJ0spQcXgPkF+C6QtVbTF9rC0dm7Ve4CWBIMJ8UqWC/na8H ewFg== X-Gm-Message-State: APjAAAUFWAWPKN9eUaRzEixmiFpQtjsedJtVHZMB84hDdIOQClfpophJ NkU9D650MnyBZEzvrhxVlLY= X-Received: by 2002:a63:9a51:: with SMTP id e17mr1412020pgo.212.1562808350302; Wed, 10 Jul 2019 18:25:50 -0700 (PDT) Received: from bbox-2.seo.corp.google.com ([2401:fa00:d:0:98f1:8b3d:1f37:3e8]) by smtp.gmail.com with ESMTPSA id b37sm10031974pjc.15.2019.07.10.18.25.45 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 10 Jul 2019 18:25:49 -0700 (PDT) From: Minchan Kim To: Andrew Morton Cc: linux-mm , LKML , linux-api@vger.kernel.org, Michal Hocko , Johannes Weiner , Tim Murray , Joel Fernandes , Suren Baghdasaryan , Daniel Colascione , Shakeel Butt , Sonny Rao , oleksandr@redhat.com, hdanton@sina.com, lizeb@google.com, Dave Hansen , "Kirill A . Shutemov" , Minchan Kim Subject: [PATCH v4 2/4] mm: change PAGEREF_RECLAIM_CLEAN with PAGE_REFRECLAIM Date: Thu, 11 Jul 2019 10:25:26 +0900 Message-Id: <20190711012528.176050-3-minchan@kernel.org> X-Mailer: git-send-email 2.22.0.410.gd8fdbe21b5-goog In-Reply-To: <20190711012528.176050-1-minchan@kernel.org> References: <20190711012528.176050-1-minchan@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The local variable references in shrink_page_list is PAGEREF_RECLAIM_CLEAN as default. It is for preventing to reclaim dirty pages when CMA try to migrate pages. Strictly speaking, we don't need it because CMA didn't allow to write out by .may_writepage = 0 in reclaim_clean_pages_from_list. Moreover, it has a problem to prevent anonymous pages's swap out even though force_reclaim = true in shrink_page_list on upcoming patch. So this patch makes references's default value to PAGEREF_RECLAIM and rename force_reclaim with ignore_references to make it more clear. This is a preparatory work for next patch. * RFCv1 * use ignore_referecnes as parameter name - hannes Acked-by: Michal Hocko Acked-by: Johannes Weiner Signed-off-by: Minchan Kim --- mm/vmscan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index a0301edd8d03..b4fa04d10ba6 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1119,7 +1119,7 @@ static unsigned long shrink_page_list(struct list_head *page_list, struct scan_control *sc, enum ttu_flags ttu_flags, struct reclaim_stat *stat, - bool force_reclaim) + bool ignore_references) { LIST_HEAD(ret_pages); LIST_HEAD(free_pages); @@ -1133,7 +1133,7 @@ static unsigned long shrink_page_list(struct list_head *page_list, struct address_space *mapping; struct page *page; int may_enter_fs; - enum page_references references = PAGEREF_RECLAIM_CLEAN; + enum page_references references = PAGEREF_RECLAIM; bool dirty, writeback; unsigned int nr_pages; @@ -1264,7 +1264,7 @@ static unsigned long shrink_page_list(struct list_head *page_list, } } - if (!force_reclaim) + if (!ignore_references) references = page_check_references(page, sc); switch (references) { -- 2.22.0.410.gd8fdbe21b5-goog