From patchwork Wed Jan 31 10:38:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hao Ge X-Patchwork-Id: 194656 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1797899dyb; Wed, 31 Jan 2024 02:39:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5/KZtm8kfZhE70H+2I3QvUy089qobEFEdwNTstxcmt7tlsANCyj1dF6vAoaoDp1IjBpGT X-Received: by 2002:a05:622a:1801:b0:42a:b21e:9beb with SMTP id t1-20020a05622a180100b0042ab21e9bebmr1233715qtc.58.1706697542269; Wed, 31 Jan 2024 02:39:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706697542; cv=pass; d=google.com; s=arc-20160816; b=juIqeWOXBfMJQBBd1dGZHaN13cMEsFwot/dMSlZdDuELGfeDXaZai5eAYt3DVTGkdF XmAgFlW28gtmRvZ+EB1Aa/EhuKPGABPSuEE/KVsqNVf3gzf370H3SM4vB2tljvPafkZq BANzQ5yIYYuq2J78sQHd2MYEUYMp3IowscmAHQvjMomkLS5Hw7vWt9UCLY3hZ+sww7kw Jix49hvDcqnTgtozTVDPD4njlQQ/MuIWI42u9xrEBvEocOblv8EYfPuBGodZxCbQAh9u TxNS09c3ArkcGp0A3ROjxr/3Ao48koKrfaZMeaswAEgQjb9orwLYrVXsbPbIu91oRyQ0 hgeQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=d9F0nlW8fG66gFZaw3BjXYTvsdW9VskLkVwlDgw9fd4=; fh=bh0neemIUqbG36lDAjnWDYpWEJn9HJBm82L1qj4KaIw=; b=i+Jt7zzmpHvLIVIImk5qJMYqwSIpoBK9DWNqriSaJUal6ePIPqF6zEHHJpS0Lh9tqs gYxhG15GuP1gea3hSzpsLbvqBl14J/c+iL+2B7KRPna37RDLdxaCv5UPbj2sZhEIw3Yt +ZRNuu5jnXDYBoQgWH0VL6wv7ya9tfpXlw3wOWUKv+oO3DjyS6rueuCETr+WjyuQ6KoI A7sKWLXYP7OEm8tywfAoCrC2MnQONoEMEZ5ZoWNcXmKe1TTgXACZbaQhRAx41HLWEgR/ MFTwFJ+6u8ai/otY2fBIhqjM/ongXsa35WBC3zsznhJufZ1SZ72fBtwjHYEh+0gDynXj SmXw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-46244-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46244-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCXgoH5zX4CobOtAbbsycs9028+ZmKTN55V4Df+TcXs2xVGhE9Q+CTAeVZr2DVqyL4zfCAat7VPS+QSWrq7+mEO7Vbit8A== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d21-20020a05622a101500b0042bee9ff8cfsi109572qte.340.2024.01.31.02.39.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 02:39:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46244-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-46244-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46244-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 134241C29CA7 for ; Wed, 31 Jan 2024 10:39:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0AAA369D0B; Wed, 31 Jan 2024 10:38:37 +0000 (UTC) Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6FA7869DF0 for ; Wed, 31 Jan 2024 10:38:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=124.126.103.232 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706697515; cv=none; b=d4PkPaafmoBarPLrJhrFVGPxtU3JliQcwNK33hEVO4HttRU89JAzLz1KFYym6B4BUk0ARuzR7M54TsYJnB6jUSPIJE2S0bEiClpmC6ra9/wQB+7RRt84h36PYvtJEsF8UrZ8ufF7QUufD6gPO5CCVgC2nfdXgNcx8P+hNzmuEwQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706697515; c=relaxed/simple; bh=C8e1M8gT3q6KVm69a0LzgiD0s9uDpLb2DaneXAidFpc=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Kh16SepFD9wItxB5xWIZRZc3UVQZAZ0RO3flyvHr2t1V2zKpVQFhy1n0S3RtRj0CO3+lFP7i4dOd+5bMirx3lRxcKNX6Du88q8rb7zNLK/ZPBv+1NDIRvKz6qZprY27W6bBI3ckt87fdNLk68KeBXOMxc08O6+NwYzGRKcBMULM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn; spf=pass smtp.mailfrom=kylinos.cn; arc=none smtp.client-ip=124.126.103.232 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylinos.cn X-UUID: 2a6a44ca43044fe09b533fd14219fef0-20240131 X-CID-O-RULE: Release_Ham X-CID-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:068b03ab-c210-451d-b607-1840b42a0c70,IP:25, URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACT ION:release,TS:5 X-CID-INFO: VERSION:1.1.35,REQID:068b03ab-c210-451d-b607-1840b42a0c70,IP:25,UR L:0,TC:0,Content:-5,EDM:0,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:5 X-CID-META: VersionHash:5d391d7,CLOUDID:1b145bfe-c16b-4159-a099-3b9d0558e447,B ulkID:240131183822BFS38S30,BulkQuantity:0,Recheck:0,SF:66|24|17|19|44|102, TC:nil,Content:0,EDM:-3,IP:-2,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 ,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_FAS,TF_CID_SPAM_FSD,TF_CID_SPAM_FSI X-UUID: 2a6a44ca43044fe09b533fd14219fef0-20240131 X-User: gehao@kylinos.cn Received: from localhost.localdomain [(116.128.244.171)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 520497664; Wed, 31 Jan 2024 18:38:20 +0800 From: Hao Ge To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, gehao618@163.com, Hao Ge Subject: [PATCH] mm/vmscan: Change the type of file from int to bool Date: Wed, 31 Jan 2024 18:38:02 +0800 Message-Id: <20240131103802.122920-1-gehao@kylinos.cn> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789602082467628433 X-GMAIL-MSGID: 1789602082467628433 Change the type of file from int to bool because is_file_lru return bool Signed-off-by: Hao Ge --- mm/vmscan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 2deae4232b83..69047bc9f5fe 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2005,7 +2005,7 @@ static void shrink_active_list(unsigned long nr_to_scan, LIST_HEAD(l_inactive); unsigned nr_deactivate, nr_activate; unsigned nr_rotated = 0; - int file = is_file_lru(lru); + bool file = is_file_lru(lru); struct pglist_data *pgdat = lruvec_pgdat(lruvec); lru_add_drain(); @@ -2419,7 +2419,7 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc, denominator = ap + fp; out: for_each_evictable_lru(lru) { - int file = is_file_lru(lru); + bool file = is_file_lru(lru); unsigned long lruvec_size; unsigned long low, min; unsigned long scan;