From patchwork Fri Dec 27 09:57:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honggyu Kim X-Patchwork-Id: 13921646 Return-Path: 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 DF8AEE7718B for ; Fri, 27 Dec 2024 09:57:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 33F1F6B007B; Fri, 27 Dec 2024 04:57:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2EDFC6B0082; Fri, 27 Dec 2024 04:57:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1B7756B0083; Fri, 27 Dec 2024 04:57:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id F29C66B007B for ; Fri, 27 Dec 2024 04:57:54 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 965C981AE5 for ; Fri, 27 Dec 2024 09:57:54 +0000 (UTC) X-FDA: 82940286324.30.B97266D Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by imf29.hostedemail.com (Postfix) with ESMTP id 9E97F120018 for ; Fri, 27 Dec 2024 09:56:51 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=none; spf=pass (imf29.hostedemail.com: domain of honggyu.kim@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=honggyu.kim@sk.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1735293453; 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:references; bh=2CMbd1fARiFljB1eFDyVt/4OVon4NGzcoQNyE1tvxQc=; b=wQBFzWdWEusgaflQp93Hoz6OqdR7XVt70EHP14Eq5N+5VtZo0BJ0DIEItl5QU9jUSOGrrA LdA0V+4DbRe4LmmP2fi06ADvKXnrZpAgXBE3eXNq+wnws5pFtfzEuWFlTEnb9jcAj1fqji r0dwPTxqbUrXwRXq4XNPb0w/CjkQu9Y= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1735293453; a=rsa-sha256; cv=none; b=JwSSg84x5haciBbKgto/viAy+mh2Jl6zdiNT/OdKcNPaEd5jFDVeKnb/NWZkKzOf7QthLs eZhIEsiOIyWnZ4QUZs5t2eBX7nsHeXNAUyt92OGE1hHLVUwpQ31Jj+2JVdoVXlwZaz05/A uZARcpr6HglQHFa6eSZNPf9K54T8yo0= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=none; spf=pass (imf29.hostedemail.com: domain of honggyu.kim@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=honggyu.kim@sk.com; dmarc=none X-AuditID: a67dfc5b-3c9ff7000001d7ae-01-676e7a1d1fa7 From: Honggyu Kim To: Gregory Price Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel_team@skhynix.com, Honggyu Kim , Andi Kleen Subject: [PATCH] mm/mempolicy: count MPOL_WEIGHTED_INTERLEAVE to "interleave_hit" Date: Fri, 27 Dec 2024 18:57:37 +0900 Message-ID: <20241227095737.645-1-honggyu.kim@sk.com> X-Mailer: git-send-email 2.43.0.windows.1 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprALMWRmVeSWpSXmKPExsXC9ZZnoa5sVV66wcejahbHJ1ha/Lx7nN3i 8q45bBb31vxndWDx6G67zO6x6dMkdo95JwM9Pm+SC2CJ4rJJSc3JLEst0rdL4Mroaz/MWrCe q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Z Sr1rdyW2HLff9EBRYOvPXzypey5YaySlbg9Y4v18b1DRDdvoDw0COz08NC4YLznct/njrjXB Fk9/fb+gUF2089nbLZHNvxxC7kxz6bHmdBSMXnf1W8ybXLbdtzqaVpw/EpMRtnLzOSOFVffe v43//zx2k//jLm2TR9USDreVWIozEg21mIuKEwHTVcoWEwIAAA== X-CFilter-Loop: Reflected X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 9E97F120018 X-Stat-Signature: kwjxhuwim5npxqzx4bfmptjna4g3wk58 X-Rspam-User: X-HE-Tag: 1735293411-522399 X-HE-Meta: U2FsdGVkX1+g2OgB1jzci3n2b5Z6AXP6YEw5zj0q8FT2zj9mCJTT9KIy0d0av+cjCjT7qAk9WibeHB4lqsD7mB/HyNFUi7l+8kgRidRJ4cWLoiUwyRFxdPhMf/pspmt+uXv2+3MxOEqYjedM93mBBB25lp+3Yoakavl8015JgfQFjdGmNv6RjnaAWBV32+S8mhDFtb0xlXbwOkSZddzS5PrdYIPq1ZcwbBTqN3/c41w31HzbCO/CcgyzJqp1TgboZ/oC5RUpd3oKt2bHY/rQn8ZsQuPs/TpnHmb+fRjIpsV6J3WEtdRRub66nGtvDkQyu+L17jF+GSY2uTsYUJxGjNmxKWYLSVUcWLbji0gwaBwaZsfQ4zfLYXiCzH7XWaRjUansTo9K0zZv76T9fJA7Bup8VSKrXYdqC/0Z5mxFWr0NqGvts8fXs2pmrjGDPR18PtguMLz/nr2U9K8lHLG4vVCQ6wqbtuOa76IL2AH+2jV2KaPCBXXLPK68QGp+N0e3g0l9Cra7n5ZafVyxYuouHwMn3ebD6EjeBKC1KRCVe0X1yfF7MrTgNKgXB+xtksekyKH4EjlwPn6jqbbiGVsdRVtk90rLD08in0mAa7k16r/eTqut6Y+j9IPC+e7qkIbDCXwOHB5S2vF47p03sfG5kVLgKTcQzVtimKrVtgKLsycp/k39ttZ9qsACesDYuAfMmtoRK+diDQ5hNbzhj/LpkmCwsGKX8ev+eT3c7pfJAuab8UAsJkwICP1THBym3WF6L++xPDg6UMJNjHLt3YtLOpxyr8AVqkpUBy+uoRvVGDJcgmO2/eefM3hEZyz8SzYD9DqBhsOZpRT4bdEUFP1jTsCB1dgjXDsadVypYr9QP6bv2oX6s4T/6NiuyFbscn9ah3NWbHUE9skSrjTLECJuwCV3uo5A/GVakDvnhqbREQWXLmqeGMpNYbQhvvx5/PpxM79yzUjN3tcTCopfGfb 5e9fyVWO NE11ZkQweZq62oqdHfQMIsjcT5pvadoc6VFJQL5sAP/76CFi5Q5kMvZwEITUP0jjDXLg2aNIUnr2fBjnzdyZ96j/PK7H54xt7KDu/mAzGfw6cbNkYKOpHobQMw1cCUgORVRti4h1m7FOlVkmaf1dJseYjJg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The fa3bea4e1f82 introduced MPOL_WEIGHTED_INTERLEAVE but it missed adding its counter to "interleave_hit" of numastat, which is located at /sys/devices/system/node/nodeN/ directory. It'd be better to add weighted interleving counter info to the existing "interleave_hit" instead of introducing a new counter "weighted_interleave_hit". Fixes: fa3bea4e1f82 ("mm/mempolicy: introduce MPOL_WEIGHTED_INTERLEAVE for weighted interleaving") Cc: Gregory Price Cc: Andi Kleen Signed-off-by: Honggyu Kim Reviewed-by: Gregory Price --- mm/mempolicy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) base-commit: 4bbf9020becbfd8fc2c3da790855b7042fad455b diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 04f35659717a..162407fbf2bc 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -2268,7 +2268,8 @@ struct page *alloc_pages_mpol_noprof(gfp_t gfp, unsigned int order, page = __alloc_pages_noprof(gfp, order, nid, nodemask); - if (unlikely(pol->mode == MPOL_INTERLEAVE) && page) { + if (unlikely(pol->mode == MPOL_INTERLEAVE || + pol->mode == MPOL_WEIGHTED_INTERLEAVE) && page) { /* skip NUMA_INTERLEAVE_HIT update if numa stats is disabled */ if (static_branch_likely(&vm_numa_stat_key) && page_to_nid(page) == nid) {