Unverified Commit 0fd3edbf authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!9415 mm: drop the 'anon_' prefix for swap-out mTHP counters

parents 19df753e 7dd55bb8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -496,11 +496,11 @@ anon_fault_fallback_charge
	instead falls back to using huge pages with lower orders or
	small pages even though the allocation was successful.

anon_swpout
swpout
	is incremented every time a huge page is swapped out in one
	piece without splitting.

anon_swpout_fallback
swpout_fallback
	is incremented if a huge page has to be split before swapout.
	Usually because failed to allocate some continuous swap space
	for the huge page.
+2 −2
Original line number Diff line number Diff line
@@ -267,8 +267,8 @@ enum mthp_stat_item {
	MTHP_STAT_ANON_FAULT_ALLOC,
	MTHP_STAT_ANON_FAULT_FALLBACK,
	MTHP_STAT_ANON_FAULT_FALLBACK_CHARGE,
	MTHP_STAT_ANON_SWPOUT,
	MTHP_STAT_ANON_SWPOUT_FALLBACK,
	MTHP_STAT_SWPOUT,
	MTHP_STAT_SWPOUT_FALLBACK,
	__MTHP_STAT_COUNT
};

+4 −4
Original line number Diff line number Diff line
@@ -701,15 +701,15 @@ static struct kobj_attribute _name##_attr = __ATTR_RO(_name)
DEFINE_MTHP_STAT_ATTR(anon_fault_alloc, MTHP_STAT_ANON_FAULT_ALLOC);
DEFINE_MTHP_STAT_ATTR(anon_fault_fallback, MTHP_STAT_ANON_FAULT_FALLBACK);
DEFINE_MTHP_STAT_ATTR(anon_fault_fallback_charge, MTHP_STAT_ANON_FAULT_FALLBACK_CHARGE);
DEFINE_MTHP_STAT_ATTR(anon_swpout, MTHP_STAT_ANON_SWPOUT);
DEFINE_MTHP_STAT_ATTR(anon_swpout_fallback, MTHP_STAT_ANON_SWPOUT_FALLBACK);
DEFINE_MTHP_STAT_ATTR(swpout, MTHP_STAT_SWPOUT);
DEFINE_MTHP_STAT_ATTR(swpout_fallback, MTHP_STAT_SWPOUT_FALLBACK);

static struct attribute *stats_attrs[] = {
	&anon_fault_alloc_attr.attr,
	&anon_fault_fallback_attr.attr,
	&anon_fault_fallback_charge_attr.attr,
	&anon_swpout_attr.attr,
	&anon_swpout_fallback_attr.attr,
	&swpout_attr.attr,
	&swpout_fallback_attr.attr,
	NULL,
};

+1 −1
Original line number Diff line number Diff line
@@ -212,7 +212,7 @@ 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_ANON_SWPOUT);
	count_mthp_stat(folio_order(folio), MTHP_STAT_SWPOUT);
#endif
	count_vm_events(PSWPOUT, folio_nr_pages(folio));
}
+1 −1
Original line number Diff line number Diff line
@@ -1925,7 +1925,7 @@ 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_ANON_SWPOUT_FALLBACK);
					count_mthp_stat(order, MTHP_STAT_SWPOUT_FALLBACK);
#endif
					if (!add_to_swap(folio))
						goto activate_locked_split;