From patchwork Mon Feb 5 04:26:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hao Ge X-Patchwork-Id: 196625 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp663663dyb; Sun, 4 Feb 2024 20:26:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IGjGG62GvNiKHejrL6sW9Vxl5aH6z6b8VKOgsc+dPoiW8/AhWhiT4uRHKITNJeV91iLVCCp X-Received: by 2002:a05:6870:d188:b0:219:11d6:57e9 with SMTP id a8-20020a056870d18800b0021911d657e9mr7827908oac.29.1707107218847; Sun, 04 Feb 2024 20:26:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707107218; cv=pass; d=google.com; s=arc-20160816; b=aSmuE+kKEN08ZUQkmFXG7+jIy9elBJFiPB6VPxFOPzzb3qfsbHVsB551Wk83k4mg7s F3A3rh3P8x85Do+1TGc3sQ1VNehafblclWYB1N7UNnP+yI+92bZcrrEN3fZYg3Bad5sQ M+E0hbGKYOvP8VlRPqCzIviHd4oQWqKeS1d6crDajWEp7NglOYFg8s6O8YiZEJAgsjy9 C4qVlTB4PurjFRZsVpVFaUvQAKpJYdxxmMZYWJTS7n9Xhd0/7MQ6TI1Qc3TxAXxxU6Hz gSc3rjEqRl2f7yli/PZf9afkIYFOywQNH9d9hsWhum1hfqEvQmlLiyGoyiy856EsX51i 5dGg== 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=TqmW8OUAT2GvIeqBspSGxut5YnyqhBRHQyL7pEnqf3c=; fh=lMlqvs7O22lKtxwvBqy+XAhslvcmRdoLtaasKS8rSFw=; b=ABf7UsCWwXVnL1Q4yUCc3lnWoa6HXBZgjabmuH5cYa38uMg0pqQ8gXcorRxce8J3nC hC943cerah+NMAYu6Ohebj0idM9P9oUzOPRJouWl5vREq5foTA9sBVwqBwBKV4cW7u4D D13zeGGNMzhoJMFqhf3yFEIFUesNI6SMhp6r57MPB/ZiI/v1DjoWcHkYUKkeqgfFoGAK I2LerPQNJ4/fFuM6zfiRrVXpdDshCaxDIrfGtSvUMTRuOpHR7NUmy+4cHSp2qjJlaJtZ APjgqiay37xa/UAc6+ClsbBg0l5lbrOmls53j8PSi6RljJp1CRGBfenGHNuHy1K1leJI gSmA==; 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-52022-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52022-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCVGnv2aPM+IX6VpGgqUFuXTVKvn6C3f1KZK3BWqDctMAMjBQbiQdLkQSEVsttV1NPvw37h78ZB4mB+LmtO3B/0PCL8S1A== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id w27-20020a63161b000000b005c5e2c15169si5445518pgl.737.2024.02.04.20.26.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 20:26:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52022-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-52022-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52022-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 22455B21742 for ; Mon, 5 Feb 2024 04:26:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4EBD3B667; Mon, 5 Feb 2024 04:26:38 +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 2C4BC947A for ; Mon, 5 Feb 2024 04:26:31 +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=1707107196; cv=none; b=cllCWtb1XoASTw6AQFY+7Bb19SQ8BN8YP1xxShizkF06PnTrgqArhHeBLzZMNVY63yGBYJSu1sLLqt8faB+X5osNcly0cm/bsHKWEUHriTsFo3Riux2xD2FePIxTtN1hIAqY7Jla9qbc1U5I/QNQrCTLkoPk/KKAFhczKQlAlqY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707107196; c=relaxed/simple; bh=VMHUHePjHMCZ5VFH/XZVgzw10KteEKVkHkUZHcLdttc=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=GguJv3/keq/uZ+ajF34ywI7XQx5DOZuGaBvhSbT9G3eVQw367ja7gemSyXqrzEIRjCsHSmtU6ZDMBPlUYTZyehwg3HMaKrkiLqDYA9OQmu0N0Zoz0QUfBW+hcmXBWqazC1VsKALOR6qpaPBAeHR08OkkEXHpQ52BhwXYuBsY1qY= 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: 82df3b9b26264eaa85c4e4ca7d33d3a0-20240205 X-CID-O-RULE: Release_Ham X-CID-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:10650bcc-489e-40c1-96ea-1d1d1f4a52e8,IP:15, 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:10650bcc-489e-40c1-96ea-1d1d1f4a52e8,IP:15,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:50f283fe-c16b-4159-a099-3b9d0558e447,B ulkID:240205102834I1NPY1F5,BulkQuantity:5,Recheck:0,SF:24|17|19|44|66|102, TC:nil,Content:0,EDM:-3,IP:-2,URL:0,File:nil,Bulk:41,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 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_FAS,TF_CID_SPAM_FSD,TF_CID_SPAM_FSI X-UUID: 82df3b9b26264eaa85c4e4ca7d33d3a0-20240205 X-User: gehao@kylinos.cn Received: from localhost.localdomain [(116.128.244.171)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 2087221324; Mon, 05 Feb 2024 12:26:22 +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: Make too_many_isolated return bool Date: Mon, 5 Feb 2024 12:26:18 +0800 Message-Id: <20240205042618.108140-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: 1790031658879835210 X-GMAIL-MSGID: 1790031658879835210 too_many_isolated should return bool which with the same name and similar functions in mm/compaction.c already returned bool Signed-off-by: Hao Ge Reviewed-by: Matthew Wilcox (Oracle) --- mm/vmscan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 4f9c854ce6cc..143e4b8e8821 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1744,17 +1744,17 @@ bool folio_isolate_lru(struct folio *folio) * the LRU list will go small and be scanned faster than necessary, leading to * unnecessary swapping, thrashing and OOM. */ -static int too_many_isolated(struct pglist_data *pgdat, int file, +static bool too_many_isolated(struct pglist_data *pgdat, int file, struct scan_control *sc) { unsigned long inactive, isolated; bool too_many; if (current_is_kswapd()) - return 0; + return false; if (!writeback_throttling_sane(sc)) - return 0; + return false; if (file) { inactive = node_page_state(pgdat, NR_INACTIVE_FILE);