From patchwork Wed Oct 2 19:55:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sridhar, Kanchana P" X-Patchwork-Id: 13820321 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 A3A64CEACF3 for ; Wed, 2 Oct 2024 19:55:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DFD1C6B051E; Wed, 2 Oct 2024 15:55:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DABDE6B051F; Wed, 2 Oct 2024 15:55:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C4CF26B0520; Wed, 2 Oct 2024 15:55:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 9DC146B051E for ; Wed, 2 Oct 2024 15:55:51 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 0B0F1140EFB for ; Wed, 2 Oct 2024 19:55:51 +0000 (UTC) X-FDA: 82629717702.15.5D2EA13 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by imf03.hostedemail.com (Postfix) with ESMTP id DD65820008 for ; Wed, 2 Oct 2024 19:55:48 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=BNmTX4yT; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf03.hostedemail.com: domain of kanchana.p.sridhar@intel.com designates 192.198.163.9 as permitted sender) smtp.mailfrom=kanchana.p.sridhar@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1727898909; a=rsa-sha256; cv=none; b=frPDfIN+j2bGwbueqryJEa/wVbMjLbsT+FnTgnBXjVpwFd3Y3M1i7ThYU0dLVtB27fvu8/ umdFioRsSGPz/sqoK7cKYBql4EAe4le8kDO0kmQwue/cQ5Qpn8jGjaI+HiGiuFosRMaFUj rxpkfdw9h4XWRUvpybnVZuNOY0+aVMI= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=BNmTX4yT; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf03.hostedemail.com: domain of kanchana.p.sridhar@intel.com designates 192.198.163.9 as permitted sender) smtp.mailfrom=kanchana.p.sridhar@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1727898909; 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:dkim-signature; bh=Zvdq32PaLYV63BLg0HnSXLrlSqhYlNEtSU2zfuIEE/I=; b=I8aRCVxChvGTzwasYYK5t76m+YGX0P5IlwWTSZQYkKOoZTYoMXmks75W4n5hYUdgQeqbIc es0XFCr+w+zkdE8jIPTIMfvhTNx9lAVXZnsW4X2CTeOoZLR4t+I8UMdzXxZbiuyGKqGHGR P0PgGrJc48Qh80ArNxn0Fjjg581qP5E= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727898949; x=1759434949; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Ogwnbfg2qtIl4g8Wi+N+nSis960IJ0UkMBfdXyfl8/Y=; b=BNmTX4yTqd0+Xzl3IGYUwmhN0L/ASNd3R4ThAr/5Vl2X4V1gd/TyduSQ fFMivsQ25oILPc/lvNDwTrKoPqEUb4CgMPIvqISWlbpPV1Y6IIqi2NuPj K5ZtTtpyyXasAky+jMJ4JogFOLbLtORG3m67BWbnPhz9i2TWUdDT3aF+s DuL5pG8EN/76PWHMTp4g4eyv/eM1U8Kc/n8sACDBvUI0gUm3ygMTvh0pA 5AgylhncH9UPT8+oBDY/+sV+QGtWOGeWapqAVuOUtecdX3Wc5Q6coH8da q5DSQP72Mr3D5VJLa5yeK6wgIEan3j0+Lfg9EfYbzDCo7SYHIuwjuOBag w==; X-CSE-ConnectionGUID: KnIX/2I3TYujlpubRoN8pA== X-CSE-MsgGUID: pA841iXZSI+DtlUML19jZg== X-IronPort-AV: E=McAfee;i="6700,10204,11213"; a="37746899" X-IronPort-AV: E=Sophos;i="6.11,172,1725346800"; d="scan'208";a="37746899" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Oct 2024 12:55:47 -0700 X-CSE-ConnectionGUID: YfADFU3DRweBhFhOJotHLw== X-CSE-MsgGUID: lEPfNQ8IR960key3l/1kJg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,172,1725346800"; d="scan'208";a="73971681" Received: from jf5300-b11a338t.jf.intel.com ([10.242.51.6]) by orviesa010.jf.intel.com with ESMTP; 02 Oct 2024 12:55:47 -0700 From: Kanchana P Sridhar To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, hannes@cmpxchg.org, yosryahmed@google.com, nphamcs@gmail.com, chengming.zhou@linux.dev, ryan.roberts@arm.com, ying.huang@intel.com, 21cnbao@gmail.com, akpm@linux-foundation.org Cc: wajdi.k.feghali@intel.com, vinodh.gopal@intel.com, kanchana.p.sridhar@intel.com Subject: [PATCH v2] mm: swap: Call count_mthp_stat() outside ifdef CONFIG_TRANSPARENT_HUGEPAGE. Date: Wed, 2 Oct 2024 12:55:47 -0700 Message-Id: <20241002195547.30617-1-kanchana.p.sridhar@intel.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Queue-Id: DD65820008 X-Rspam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vo/MIW1njJ2t8EjUIfVwQUHXPHJBVpcQyBgmoE7Zje5CnHXqUEV0Gdrj4cjFcV9U8jarc5zB929Ygrp74qdfY3krTnnK3bf8VsHnr2WdCR67/ZkPkrwOwLa8ZOA9KuLnSBMvUo5BeUPzWAnDOz26oETNC56PKyVtbG58sDaEWeWm9Ovr19krzGJcxvH//+KgTbAJn868k+vBEDZUyTaqtQaZuXUFzDBzb+JjbRg8DMzmO4dGCV+8Vg== 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: This patch moves the call to count_mthp_stat() in count_swpout_vm_event() and in shrink_folio_list() to be outside the "ifdef CONFIG_TRANSPARENT_HUGEPAGE" based on changes made in commit 246d3aa3e531 ("mm: cleanup count_mthp_stat() definition"). Signed-off-by: Kanchana P Sridhar Reviewed-by: Nhat Pham --- mm/page_io.c | 2 +- mm/vmscan.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/page_io.c b/mm/page_io.c index 4aa34862676f..a28d28b6b3ce 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -289,8 +289,8 @@ static inline void count_swpout_vm_event(struct folio *folio) count_memcg_folio_events(folio, THP_SWPOUT, 1); count_vm_event(THP_SWPOUT); } - count_mthp_stat(folio_order(folio), MTHP_STAT_SWPOUT); #endif + count_mthp_stat(folio_order(folio), MTHP_STAT_SWPOUT); count_memcg_folio_events(folio, PSWPOUT, folio_nr_pages(folio)); count_vm_events(PSWPOUT, folio_nr_pages(folio)); } diff --git a/mm/vmscan.c b/mm/vmscan.c index dc7a285b256b..50dc06d55b1d 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1257,8 +1257,8 @@ static unsigned int shrink_folio_list(struct list_head *folio_list, THP_SWPOUT_FALLBACK, 1); count_vm_event(THP_SWPOUT_FALLBACK); } - count_mthp_stat(order, MTHP_STAT_SWPOUT_FALLBACK); #endif + count_mthp_stat(order, MTHP_STAT_SWPOUT_FALLBACK); if (!add_to_swap(folio)) goto activate_locked_split; }