Re: [RFC PATCH v4 0/2] mm/zsmalloc: defer object free to per-cpu batches
From: Sergey Senozhatsky
Date: Thu Nov 19 2026 - 00:35:28 EST
Somehow your emails landed in the SPAM folder.
On (26/11/09 18:59), Hongfeng Chen wrote:
> On Fri, Oct 23, 2026 at 11:19 AM Nhat Pham <nphamcs@xxxxxxxxx> wrote:
> > Is there any more juice we can squeeze from zsmalloc in that case?
> >
> > It would be nice if you can perf zsmalloc freeing. And yeah, maybe we
> > can't optimize any further, but let's eliminate that first before we
> > rely on offloading.
>
> Here is the perf breakdown of the free path:
>
> zram:
>
> __swap_cluster_free_entries 90.28%
> zram_slot_free_notify 86.01%
> slot_free 74.15%
> zs_free 56.01%
> __free_frozen_pages 19.85%
> kmem_cache_free 10.15%
> _raw_spin_lock 5.53%
> fix_fullness_group 3.31%
> dec_zone_page_state 2.43%
> obj_free 2.17%
> trylock_zspage 2.12%
We removed one of kmem_cache_free() from zs_free() [1].
[1] https://lore.kernel.org/linux-kernel/20261110054836.1515030-1-senozhatsky@xxxxxxxxxxxx