On Mon, Feb 03, 2025 at 10:28:50AM +0100, Vlastimil Babka wrote:
> kvfree_rcu() is batched for better performance except on TINY_RCU, which
> is a simple implementation for small UP systems. Similarly SLUB_TINY is
> an option intended for small systems, whether or not used together with
> TINY_RCU. In case SLUB_TINY is used with !TINY_RCU, it makes arguably
> sense to not do the batching and limit the memory footprint. It's also
> suboptimal to have RCU-specific #ifdefs in slab code.
> 
> With that, add CONFIG_KVFREE_RCU_BATCHED to determine whether batching
> kvfree_rcu() implementation is used. It is not set by a user prompt, but
> enabled by default and disabled in case TINY_RCU or SLUB_TINY are
> enabled.
> 
> Use the new config for #ifdef's in slab code and extend their scope to
> cover all code used by the batched kvfree_rcu(). For example there's no
> need to perform kvfree_rcu_init() if the batching is disabled.
> 
> Reviewed-by: Uladzislau Rezki (Sony) <ure...@gmail.com>
> Reviewed-by: Joel Fernandes (Google) <j...@joelfernandes.org>
> Signed-off-by: Vlastimil Babka <vba...@suse.cz>
> ---

Looks good to me,
Reviewed-by: Hyeonggon Yoo <42.hye...@gmail.com>

-- 
Harry

Reply via email to