From patchwork Wed Oct 2 17:30:30 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: 13820148 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 9D1EFCEB2E2 for ; Wed, 2 Oct 2024 17:30:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0B8E46B00BF; Wed, 2 Oct 2024 13:30:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0691E4401B5; Wed, 2 Oct 2024 13:30:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E73266B015B; Wed, 2 Oct 2024 13:30:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id BE5B26B00BF for ; Wed, 2 Oct 2024 13:30:36 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 2D9F040CEF for ; Wed, 2 Oct 2024 17:30:36 +0000 (UTC) X-FDA: 82629351672.16.0006319 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by imf30.hostedemail.com (Postfix) with ESMTP id 4EE2780018 for ; Wed, 2 Oct 2024 17:30:33 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=jDlS5qh0; spf=pass (imf30.hostedemail.com: domain of kanchana.p.sridhar@intel.com designates 198.175.65.13 as permitted sender) smtp.mailfrom=kanchana.p.sridhar@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1727890169; 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=NhuPo3v7ttYxOLmnx67CZPdHPWfy0l+HW+HTtArsyew=; b=44HUg2DYy/9YyRCytS9gqZp5mmTAlnBAXuv/8M3riWzIfGENOwyE9BRusJWAVWDDGOQ1JU GrUzpBV0US4itVon9o6dt6bK60/9yci+L+X/tWiKq+K2fiiN895wlr4P5tZvQUQQRjKho6 rvw7PRrZPEiNLWDG/+bkHUkNKx7iusg= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=jDlS5qh0; spf=pass (imf30.hostedemail.com: domain of kanchana.p.sridhar@intel.com designates 198.175.65.13 as permitted sender) smtp.mailfrom=kanchana.p.sridhar@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1727890169; a=rsa-sha256; cv=none; b=XI5sUDJk+C5uYHmewpqgbg37HcOXhHPmEmTugt/pdPBUxdU+FdCjmqZbw3WADU1/nz0SsV H9mAgy4bgCFFqmK3L0+Mz20UbBoW2s2ZCSFXW3WtpFZRsUmtOqbmzl0HpU1RFZLQtStEkM 9ib9ZEZia8874NtrsB2XN75qjU1arSc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727890234; x=1759426234; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=2ELES4Kbwfg1bRDv3Fg/Pic/+KP79M6fZWl7HfTF6vU=; b=jDlS5qh0No9pks0MdfuV4bnhxnwotPrBusnSWlwRpJ5kuMlW7OsGFxbP rqwUKt9oWqP388E0XsmS47nFg6sHG4LuBLTEfXsAOgmQyMFBBNTou0ZwE MwfOeGddYbmz4nHM3HPHfRpW9FfvxQZyMQjzagDUiXM3BE0fk+UhgiOAN RBHXcLXsF2jSu4ops32CTYZdKYvjwS+1aOf/HmcQTTeF5X+fbcWWOs7zo doUUeGrAos/PwDo+QNTniFsExPXfG7Ts6PWhWYk6unbIuRzDFAb2qJWrN 3Kx/NX9IQ6GU7/BE2RrODGg+jIQbXIYeFg54+cA46EiFSI1ZEQw+Lyx29 g==; X-CSE-ConnectionGUID: 9sGQ0WvkRE66ez9UJ0k+xg== X-CSE-MsgGUID: 9WJBgIV0TpuqELC0oav/1g== X-IronPort-AV: E=McAfee;i="6700,10204,11213"; a="38199921" X-IronPort-AV: E=Sophos;i="6.11,172,1725346800"; d="scan'208";a="38199921" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Oct 2024 10:30:31 -0700 X-CSE-ConnectionGUID: vCREuwdORgeYm4C9noXeAA== X-CSE-MsgGUID: cbsfuzteSPSQsEpQkAanJQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,172,1725346800"; d="scan'208";a="79038099" Received: from jf5300-b11a338t.jf.intel.com ([10.242.51.6]) by orviesa004.jf.intel.com with ESMTP; 02 Oct 2024 10:30:30 -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 v1] mm: swap: Call count_mthp_stat() outside ifdef CONFIG_TRANSPARENT_HUGEPAGE. Date: Wed, 2 Oct 2024 10:30:30 -0700 Message-Id: <20241002173030.213536-1-kanchana.p.sridhar@intel.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-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XO/+xxQeM005tQ/CenCMzflsMTioEI4yJAe5FK4wvmGhzaqryRR7hlP5x0nd8PW4ui2oVVJ7xDri2jRHxhLpSCa0sPrMnzoaVJztJah7Ny8r1i0OHpyOLh2RQ8z0Mn9b0MVFBUpiQwqI90EBjrLz+EjvhgTMNbeC7NV4k+NzwPTBWYv4RVYgfXfCOlw4dqmBcgC2tFak2CowhvdYzc9aKFi 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() to be outside the "ifdef CONFIG_TRANSPARENT_HUGEPAGE" based on changes made in commit 246d3aa3e53151fa150f10257ddd8a4facd31a6a ("mm: cleanup count_mthp_stat() definition"). Signed-off-by: Kanchana P Sridhar Reviewed-by: Nhat Pham --- mm/page_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); }