mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 14:04:27 -04:00
mm/swap: remove count_swpout_vm_event
There is only one caller left, so merge it into that. Link: https://lore.kernel.org/20260713093350.2154226-5-hch@lst.de Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Baoquan He <baoquan.he@linux.dev> Reviewed-by: Nhat Pham <nphamcs@gmail.com> Cc: Baolin Wang <baolin.wang@linux.alibaba.com> Cc: Barry Song <baohua@kernel.org> Cc: Chris Li <chrisl@kernel.org> Cc: Kairui Song <kasong@tencent.com> Cc: Kemeng Shi <shikemeng@huaweicloud.com> Cc: Youngjun Park <youngjun.park@lge.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
dda8fb68b5
commit
4e915b16de
24
mm/page_io.c
24
mm/page_io.c
@@ -254,19 +254,6 @@ int swap_writeout(struct swap_io_ctx *ctx, struct folio *folio)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void count_swpout_vm_event(struct folio *folio)
|
||||
{
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
if (unlikely(folio_test_pmd_mappable(folio))) {
|
||||
count_memcg_folio_events(folio, THP_SWPOUT, 1);
|
||||
count_vm_event(THP_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));
|
||||
}
|
||||
|
||||
#if defined(CONFIG_MEMCG) && defined(CONFIG_BLK_CGROUP)
|
||||
static struct cgroup_subsys_state *folio_memcg_blkg_css(struct folio *folio)
|
||||
{
|
||||
@@ -397,7 +384,16 @@ void __swap_writepage(struct swap_io_ctx *ctx, struct folio *folio)
|
||||
{
|
||||
VM_BUG_ON_FOLIO(!folio_test_swapcache(folio), folio);
|
||||
|
||||
count_swpout_vm_event(folio);
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
if (unlikely(folio_test_pmd_mappable(folio))) {
|
||||
count_memcg_folio_events(folio, THP_SWPOUT, 1);
|
||||
count_vm_event(THP_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));
|
||||
|
||||
folio_start_writeback(folio);
|
||||
folio_unlock(folio);
|
||||
swap_add_folio(ctx, folio, WRITE);
|
||||
|
||||
Reference in New Issue
Block a user