* + mm-swap-make-some-count_mthp_stat-call-sites-be-thp-agnostic.patch added to mm-unstable branch
@ 2024-10-03 19:58 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-10-03 19:58 UTC (permalink / raw)
To: mm-commits, yosryahmed, ying.huang, wajdi.k.feghali, ryan.roberts,
nphamcs, hannes, chengming.zhou, kanchana.p.sridhar, akpm
The patch titled
Subject: mm: swap: make some count_mthp_stat() call-sites be THP-agnostic.
has been added to the -mm mm-unstable branch. Its filename is
mm-swap-make-some-count_mthp_stat-call-sites-be-thp-agnostic.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-swap-make-some-count_mthp_stat-call-sites-be-thp-agnostic.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Kanchana P Sridhar <kanchana.p.sridhar@intel.com>
Subject: mm: swap: make some count_mthp_stat() call-sites be THP-agnostic.
Date: Wed, 2 Oct 2024 15:58:22 -0700
In commit 246d3aa3e531 ("mm: cleanup count_mthp_stat() definition"), Ryan
Roberts has pointed out the merits of mm code that does not require THP,
to be compile-able without requiring THP ifdefs. As a step in that
direction, he has moved count_mthp_stat() to be always defined, resolving
to a no-op if THP is not defined.
Barry Song referred me to Ryan's commit when I was working on the "mm:
zswap swap-out of large folios" patch-series [1].
This patch propagates the benefits of the above change to page_io.c and
vmscan.c. As a result, there is one less reason to have the ifdef THP in
these code sections.
[1]: https://patchwork.kernel.org/project/linux-mm/list/?series=894347
Link: https://lkml.kernel.org/r/20241002225822.9006-1-kanchana.p.sridhar@intel.com
Signed-off-by: Kanchana P Sridhar <kanchana.p.sridhar@intel.com>
Reviewed-by: Nhat Pham <nphamcs@gmail.com>
Cc: Chengming Zhou <chengming.zhou@linux.dev>
Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Wajdi Feghali <wajdi.k.feghali@intel.com>
Cc: Yosry Ahmed <yosryahmed@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/page_io.c | 2 +-
mm/vmscan.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/mm/page_io.c~mm-swap-make-some-count_mthp_stat-call-sites-be-thp-agnostic
+++ a/mm/page_io.c
@@ -289,8 +289,8 @@ static inline void count_swpout_vm_event
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));
}
--- a/mm/vmscan.c~mm-swap-make-some-count_mthp_stat-call-sites-be-thp-agnostic
+++ a/mm/vmscan.c
@@ -1257,8 +1257,8 @@ retry:
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;
}
_
Patches currently in -mm which might be from kanchana.p.sridhar@intel.com are
mm-zswap-delete-comments-for-value-member-of-struct-zswap_entry.patch
mm-define-obj_cgroup_get-if-config_memcg-is-not-defined.patch
mm-zswap-modify-zswap_compress-to-accept-a-page-instead-of-a-folio.patch
mm-zswap-rename-zswap_pool_get-to-zswap_pool_tryget.patch
mm-change-count_objcg_event-to-count_objcg_events-for-batch-event-updates.patch
mm-zswap-modify-zswap_stored_pages-to-be-atomic_long_t.patch
mm-zswap-support-large-folios-in-zswap_store.patch
mm-swap-count-successful-large-folio-zswap-stores-in-hugepage-zswpout-stats.patch
mm-zswap-zswap_store_page-will-initialize-entry-after-adding-to-xarray.patch
mm-swap-make-some-count_mthp_stat-call-sites-be-thp-agnostic.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-10-03 19:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-03 19:58 + mm-swap-make-some-count_mthp_stat-call-sites-be-thp-agnostic.patch added to mm-unstable branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.