public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Uladzislau Rezki <urezki@gmail.com>
To: Julia Lawall <Julia.Lawall@inria.fr>,
	Anna-Maria Behnsen <anna-maria@linutronix.de>
Cc: Anna-Maria Behnsen <anna-maria@linutronix.de>,
	kernel-janitors@vger.kernel.org, vbabka@suse.cz,
	paulmck@kernel.org, Frederic Weisbecker <frederic@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 11/17] posix-timers: replace call_rcu by kfree_rcu for simple kmem_cache_free callback
Date: Wed, 16 Oct 2024 14:13:33 +0200	[thread overview]
Message-ID: <Zw-t7a2M3rZGdZei@pc636> (raw)
In-Reply-To: <20241013201704.49576-12-Julia.Lawall@inria.fr>

On Sun, Oct 13, 2024 at 10:16:58PM +0200, Julia Lawall wrote:
> Since SLOB was removed and since
> commit 6c6c47b063b5 ("mm, slab: call kvfree_rcu_barrier() from kmem_cache_destroy()"),
> it is not necessary to use call_rcu when the callback only performs
> kmem_cache_free. Use kfree_rcu() directly.
> 
> The changes were made using Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
> 
> ---
>  kernel/time/posix-timers.c |    9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c
> index 4576aaed13b2..fc40dacabe78 100644
> --- a/kernel/time/posix-timers.c
> +++ b/kernel/time/posix-timers.c
> @@ -413,18 +413,11 @@ static struct k_itimer * alloc_posix_timer(void)
>  	return tmr;
>  }
>  
> -static void k_itimer_rcu_free(struct rcu_head *head)
> -{
> -	struct k_itimer *tmr = container_of(head, struct k_itimer, rcu);
> -
> -	kmem_cache_free(posix_timers_cache, tmr);
> -}
> -
>  static void posix_timer_free(struct k_itimer *tmr)
>  {
>  	put_pid(tmr->it_pid);
>  	sigqueue_free(tmr->sigq);
> -	call_rcu(&tmr->rcu, k_itimer_rcu_free);
> +	kfree_rcu(tmr, rcu);
>  }
>  
>  static void posix_timer_unhash_and_free(struct k_itimer *tmr)
> 
> 
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>

--
Uladzislau Rezki

  reply	other threads:[~2024-10-16 12:13 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-13 20:16 [PATCH 00/17] replace call_rcu by kfree_rcu for simple kmem_cache_free callback Julia Lawall
2024-10-13 20:16 ` [PATCH 01/17] wireguard: allowedips: " Julia Lawall
2024-10-16 11:04   ` Uladzislau Rezki
2024-10-13 20:16 ` [PATCH 02/17] ipv4: " Julia Lawall
2024-10-14  7:41   ` Eric Dumazet
2024-10-13 20:16 ` [PATCH 03/17] inetpeer: " Julia Lawall
2024-10-14  7:42   ` Eric Dumazet
2024-10-13 20:16 ` [PATCH 04/17] ipv6: " Julia Lawall
2024-10-14  7:43   ` Eric Dumazet
2024-10-13 20:16 ` [PATCH 05/17] xfrm6_tunnel: " Julia Lawall
2024-10-16 11:05   ` Uladzislau Rezki
2024-10-13 20:16 ` [PATCH 06/17] batman-adv: " Julia Lawall
2024-10-14  7:03   ` Sven Eckelmann
2024-10-14  7:08     ` Julia Lawall
2024-10-14  7:19       ` Vlastimil Babka
2024-10-14  8:03   ` Sven Eckelmann
2024-10-13 20:16 ` [PATCH 07/17] eCryptfs: " Julia Lawall
2024-10-16 11:06   ` Uladzislau Rezki
2024-10-13 20:16 ` [PATCH 08/17] net: bridge: " Julia Lawall
2024-10-14  7:04   ` Nikolay Aleksandrov
2024-10-16 11:07   ` Uladzislau Rezki
2024-10-13 20:16 ` [PATCH 09/17] block: " Julia Lawall
2024-10-16 11:08   ` Uladzislau Rezki
2024-10-13 20:16 ` [PATCH 10/17] can: gw: " Julia Lawall
2024-10-14  3:03   ` Vincent MAILHOL
2024-10-13 20:16 ` [PATCH 11/17] posix-timers: " Julia Lawall
2024-10-16 12:13   ` Uladzislau Rezki [this message]
2024-10-24  9:29   ` [tip: timers/core] posix-timers: Replace call_rcu() by kfree_rcu() for simple kmem_cache_free() callback tip-bot2 for Julia Lawall
2024-10-13 20:16 ` [PATCH 12/17] nfsd: replace call_rcu by kfree_rcu for simple kmem_cache_free callback Julia Lawall
2024-10-13 23:16   ` cel
2024-10-13 20:17 ` [PATCH 13/17] KVM: PPC: " Julia Lawall
2024-10-16 12:14   ` Uladzislau Rezki
2024-10-13 20:17 ` [PATCH 14/17] kcm: " Julia Lawall
2024-10-16 12:16   ` Uladzislau Rezki
2024-10-13 20:17 ` [PATCH 15/17] netfilter: nf_conncount: " Julia Lawall
2024-10-16 12:18   ` Uladzislau Rezki
2024-10-13 20:17 ` [PATCH 16/17] netfilter: expect: " Julia Lawall
2024-10-16 12:18   ` Uladzislau Rezki
2024-10-13 20:17 ` [PATCH 17/17] netfilter: xt_hashlimit: " Julia Lawall
2024-10-16 12:19   ` Uladzislau Rezki
2024-10-13 20:53 ` (subset) [PATCH 00/17] " Jens Axboe
2024-10-14  0:31 ` Paul E. McKenney
2024-10-14  7:23 ` Vlastimil Babka
2024-10-14 11:26 ` Pablo Neira Ayuso
2024-10-15 13:40 ` patchwork-bot+netdevbpf
2024-10-15 18:00 ` patchwork-bot+netdevbpf
2024-11-17 11:56 ` (subset) " Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zw-t7a2M3rZGdZei@pc636 \
    --to=urezki@gmail.com \
    --cc=Julia.Lawall@inria.fr \
    --cc=anna-maria@linutronix.de \
    --cc=frederic@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox