Message ID | 20250107000346.1338481-3-gourry@gourry.net (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF5ADE77198 for <linux-mm@archiver.kernel.org>; Tue, 7 Jan 2025 00:03:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 753A76B0083; Mon, 6 Jan 2025 19:03:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 702B86B00A3; Mon, 6 Jan 2025 19:03:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 52DDA6B00C7; Mon, 6 Jan 2025 19:03:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 2EFCE6B0083 for <linux-mm@kvack.org>; Mon, 6 Jan 2025 19:03:58 -0500 (EST) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id DEFB4A04F0 for <linux-mm@kvack.org>; Tue, 7 Jan 2025 00:03:57 +0000 (UTC) X-FDA: 82978707714.14.3C04ECF Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) by imf01.hostedemail.com (Postfix) with ESMTP id 12ACB4001A for <linux-mm@kvack.org>; Tue, 7 Jan 2025 00:03:55 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=A0aOXGEN; dmarc=none; spf=pass (imf01.hostedemail.com: domain of gourry@gourry.net designates 209.85.219.42 as permitted sender) smtp.mailfrom=gourry@gourry.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736208236; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ZWCvp/kko+WPP0qjUKzUrB7Xv2NearCGyN4SJ89IJRc=; b=EmdtpT/1PpEKK/zaKAxQuJ8uKF53TIRaQvN0lTD2ZUdisMEg8T2jjT2rT3ecmtv5ndGIPK kGbAuJqX7KjSPp0PjAZSA/Sd2DeWOwVg9w0oUo+YNCXPEcfCDwPvIIcN/9r0jFqGG7vmeG OaBvSubkBnmsFr+F9b8sYvX0qgI4nJA= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736208236; a=rsa-sha256; cv=none; b=xk2KdGWNpdRan8w81zraZugG5eIiy7R4ytLl3s7kTHriAtlwyWoM1xrol9Gvp+W6SAzRD6 imyK85gDLeZFaMs4qw2ISB8bSqA8MYKFlrH1oEdzXTmGCszr/5OYMjOUegBwz3n8tX+ou0 Y0s+C35oUThxkNbsl2wkM1Rj4uLmQ5c= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=A0aOXGEN; dmarc=none; spf=pass (imf01.hostedemail.com: domain of gourry@gourry.net designates 209.85.219.42 as permitted sender) smtp.mailfrom=gourry@gourry.net Received: by mail-qv1-f42.google.com with SMTP id 6a1803df08f44-6dd43aa1558so108407926d6.0 for <linux-mm@kvack.org>; Mon, 06 Jan 2025 16:03:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1736208235; x=1736813035; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZWCvp/kko+WPP0qjUKzUrB7Xv2NearCGyN4SJ89IJRc=; b=A0aOXGENZutUyLwIyrwKedAx45/02UBAhxeE3UhSkLgrcyhzAkxQ+Ok3Dpl1h3wuzM 4HmhB2M5YRowfcKaMasaAVJ/wgl9tFfJ2Grf7VhzH9y9VayW40eTcz6mRrXyy8/RROBw avC5+XZt/Ojrnef8xan9nnJ0f13AVIkllfa6S5PI4EhHwyv6Sf7pvPt33FBgOdXXEOET AClGikt9nzzufATWD1zrEgrKV6YEmjkPviKWZFXz5aHKe+x+ApwcTAiMQkdt2GmDchK5 vCzhRu3vOMb14UZdGCDW7+RzkxZJhI5lJJY2oqQxaRmmmN2G19Sfsliw/Lvx4vv2oy80 fj+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736208235; x=1736813035; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZWCvp/kko+WPP0qjUKzUrB7Xv2NearCGyN4SJ89IJRc=; b=ujlLqnT6osRZtmf7NKvrl3A2dw9Zsw3z5zJgNbk4MzkT2ZNIl0WuPhL+94RQU2zG1E IgtM9qpoUlk8OZPSdHyYaNSsHWLd1vIBpSF+D1LP9kiDPalLrtPaMxJb2cz40JpEx+CG cmhHzmk4xad0Tye7riW+KdkMu/R90/aZyHrUOQF/puq0QCP1JLAWQUh8vg4uCVGO0PhC LCoV7KwJYHuquEQjZMab/4G0xFm70pdadjS2PWWE7uE09rzgbaFuq0LtJM9kRpsPrgbT 6IlfkybRhmR39DRpGkwyUSpzCkImWYtCLtscqngw9Rrw2M6DxnY+1oe0MX0aEJAdFz8v y1QA== X-Gm-Message-State: AOJu0YxfuTzeMidJyJfUMs+93cj7+p/4MN/hjvLILS7H4ZOYfVwJJ6tl BF6jTw0CyhVl8YumpNB9QY7wX4kPJ31m9tCiJciKG39HDbUNxYvL6KenWDHr3h1AYGg/dost2Y8 k X-Gm-Gg: ASbGncvii9/WhREDaLcxCRf9143vLTvdux1qlNZ7XEIY4bu3Qt2DZy8bNouYJiA/IKY sCV+igJekF5fr1dpoObCfej03NjlhvsmZB+2ttiF/ImFqhPx0TvSafhn+g3i7WHo/LvZ7Gji37M kblVVXO6ejxNcc6s/FR5HBsXeYkrTT5YnYG2oSB2kkjas/mPnf4jqp1sVqdr3HOlF06tbs0pAQY aB8JqlQ6bRZx5CpmZiJ9pNmZb/QU6NwdXqIA198RKr8Jnqs16C9NoIf3UzrQYlPtDbBTIHed+0S VQ4deapWQFBDm8kQ+PLWvhOyhHCvdovVXXsJY3CgeadA X-Google-Smtp-Source: AGHT+IHrk99R5d/+390QkKolkyUXQWqv1/fjT8A0hpydPLDQYb+viHAXemLnF0B4ZPb3yXMDp4MjqQ== X-Received: by 2002:a05:6214:c4d:b0:6d4:3c10:5065 with SMTP id 6a1803df08f44-6dd233a0527mr872530576d6.32.1736208234983; Mon, 06 Jan 2025 16:03:54 -0800 (PST) Received: from gourry-fedora-PF4VCD3F.lan (pool-173-79-56-208.washdc.fios.verizon.net. [173.79.56.208]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6dd18137218sm174104476d6.57.2025.01.06.16.03.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2025 16:03:54 -0800 (PST) From: Gregory Price <gourry@gourry.net> To: linux-mm@kvack.org Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, nehagholkar@meta.com, abhishekd@meta.com, david@redhat.com, nphamcs@gmail.com, gourry@gourry.net, akpm@linux-foundation.org, hannes@cmpxchg.org, kbusch@meta.com, ying.huang@linux.alibaba.com, feng.tang@intel.com, donettom@linux.ibm.com Subject: [PATCH v3 2/6] memory: move conditionally defined enums use inside ifdef tags Date: Mon, 6 Jan 2025 19:03:42 -0500 Message-ID: <20250107000346.1338481-3-gourry@gourry.net> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250107000346.1338481-1-gourry@gourry.net> References: <20250107000346.1338481-1-gourry@gourry.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Sign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B4SEKwfNAmjv QAFHaOZD rzS4IX+JHJTx8PQ3sjX5+STEbc3rLE10QZ4KzNsq7ROkdBYMsLv/hLp7kT+BhoTLoy1XaDRLMG6mr0R5KsF3WXYjFwXsONryogX0J/SwyTra857CteWFCv/S0HQOX/vsCwcYSRSx5ymkHWKUR7aeUjntk/jOb3tRhBZeSiwhfSIpVP7VSOlw04advn31NBu/lUiipeDPZPMkSlzAaXhqndsvRvt7IcGe83+jo5BaO40wZ4AqfR8uEPngwKsfvVDCf3/BwanbwVbvsupoDDDV20hew3M2vPwMN2d0mFR1PprdskZB6/RM8t6yiSA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000622, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Promotion of Unmapped Page Cache Folios.
|
expand
|
diff --git a/mm/memory.c b/mm/memory.c index 9cc93c2f79f3..8d254e97840d 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -5571,14 +5571,14 @@ int numa_migrate_check(struct folio *folio, struct vm_fault *vmf, /* Record the current PID acceesing VMA */ vma_set_access_pid_bit(vma); - count_vm_numa_event(NUMA_HINT_FAULTS); #ifdef CONFIG_NUMA_BALANCING + count_vm_numa_event(NUMA_HINT_FAULTS); count_memcg_folio_events(folio, NUMA_HINT_FAULTS, 1); -#endif if (folio_nid(folio) == numa_node_id()) { count_vm_numa_event(NUMA_HINT_FAULTS_LOCAL); *flags |= TNF_FAULT_LOCAL; } +#endif return mpol_misplaced(folio, vmf, addr); }
NUMA_HINT_FAULTS and NUMA_HINT_FAULTS_LOCAL are only defined if CONFIG_NUMA_BALANCING is defined, but are used outside the tags in numa_migrate_check(). Fix this. TNF_SHARED is only used if CONFIG_NUMA_BALANCING is enabled, so moving this line inside the ifdef is also safe - despite use of TNF_* elsewhere in the function. TNF_* are not conditionally defined. Signed-off-by: Gregory Price <gourry@gourry.net> --- mm/memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)