Re: + zsmalloc-fine-grained-inuse-ratio-based-fullness-grouping-fix-fix.patch added to mm-unstable branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On (23/03/03 15:29), Andrew Morton wrote:
> From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Subject: zsmalloc-fine-grained-inuse-ratio-based-fullness-grouping-fix-fix
> Date: Fri Mar  3 03:25:23 PM PST 2023
> 
> fix zs_stats_size_show() accumulation, per Yosry

[..]

> --- a/mm/zsmalloc.c~zsmalloc-fine-grained-inuse-ratio-based-fullness-grouping-fix-fix
> +++ a/mm/zsmalloc.c
> @@ -651,9 +651,9 @@ static int zs_stats_size_show(struct seq
>  		 * stats.
>  		 */
>  		for (fg = ZS_INUSE_RATIO_70; fg <= ZS_INUSE_RATIO_99; fg++)
> -			class_almost_full = zs_stat_get(class, fg);
> +			class_almost_full += zs_stat_get(class, fg);
>  		for (fg = ZS_INUSE_RATIO_10; fg < ZS_INUSE_RATIO_70; fg++)
> -			class_almost_empty = zs_stat_get(class, fg);
> +			class_almost_empty += zs_stat_get(class, fg);
>  
>  		obj_allocated = zs_stat_get(class, ZS_OBJS_ALLOCATED);
>  		obj_used = zs_stat_get(class, ZS_OBJS_INUSE);

This also needs to set class_almost_full and class_almost_empty to 0
for each class.

Andrew, I'll send v4 in a bit.



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux