[RFC 8/8] powerpc/book3s64/slb: Add slb faults to vmstat

Stephen Rothwell sfr at canb.auug.org.au
Sat Aug 30 14:45:42 AEST 2025


Hi Ritesh,

On Sat, 30 Aug 2025 09:21:47 +0530 "Ritesh Harjani (IBM)" <ritesh.list at gmail.com> wrote:
>
> diff --git a/mm/vmstat.c b/mm/vmstat.c
> index 71cd1ceba191..8cd17a5fc72b 100644
> --- a/mm/vmstat.c
> +++ b/mm/vmstat.c
> @@ -1464,6 +1464,11 @@ const char * const vmstat_text[] = {
>  	[I(DIRECT_MAP_LEVEL2_COLLAPSE)]		= "direct_map_level2_collapses",
>  	[I(DIRECT_MAP_LEVEL3_COLLAPSE)]		= "direct_map_level3_collapses",
>  #endif
> +#ifdef CONFIG_PPC_BOOK3S_64
> +	"slb_kernel_faults",
> +	"slb_user_faults",
> +#endif
> +
>  #ifdef CONFIG_PER_VMA_LOCK_STATS
>  	[I(VMA_LOCK_SUCCESS)]			= "vma_lock_success",
>  	[I(VMA_LOCK_ABORT)]			= "vma_lock_abort",

Should you be using explicit indexes and the I() macro?

-- 
Cheers,
Stephen Rothwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20250830/cf9bdb93/attachment.sig>


More information about the Linuxppc-dev mailing list