On 2/6/26 10:34, Harry Yoo wrote:
> These are a few improvements for k[v]free_rcu() API, which were suggested
> by Alexei Starovoitov.
> 
> [ To kmemleak folks: I'm going to teach delete_object_full() and
>   paint_ptr() to ignore cases when the object does not exist.
>   Could you please let me know if the way it's done in patch 3
>   looks good? Only part 2 is relevant to you. ]
> 
> Although I've put some effort into providing a decent quality
> implementation, I'd like you to consider this as a proof-of-concept
> and let's discuss how best we could tackle those problems:
> 
>   1) Allow an 8-byte field to be used as an alternative to
>      struct rcu_head (16-byte) for 2-argument kvfree_rcu()
>   2) kmalloc_nolock() -> kfree[_rcu]() support
>   3) Add kfree_rcu_nolock() for NMI context

Since you went bravely into this area, I'd like to suggest some more :)

- teach CONFIG_KVFREE_RCU_BATCHED to handle kfree_rcu sheaves after they
fill, instead of the standard call_rcu() handling

- make kvfree_call_rcu() -> kfree_rcu_sheaf() compatible with PREEMPT_RT

Thanks,
Vlastimil

Reply via email to