[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2c092f98a8fe1702173fe2b4999811dd2263faf3.camel@redhat.com>
Date: Tue, 26 Apr 2022 09:38:22 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Eric Dumazet <eric.dumazet@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: netdev <netdev@...r.kernel.org>, Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH v2 net-next] net: generalize skb freeing deferral to
per-cpu lists
Hello,
I'm sorry for the late feedback. I have only a possibly relevant point
below.
On Fri, 2022-04-22 at 13:12 -0700, Eric Dumazet wrote:
[...]
> @@ -6571,6 +6577,28 @@ static int napi_threaded_poll(void *data)
> return 0;
> }
>
> +static void skb_defer_free_flush(struct softnet_data *sd)
> +{
> + struct sk_buff *skb, *next;
> + unsigned long flags;
> +
> + /* Paired with WRITE_ONCE() in skb_attempt_defer_free() */
> + if (!READ_ONCE(sd->defer_list))
> + return;
> +
> + spin_lock_irqsave(&sd->defer_lock, flags);
> + skb = sd->defer_list;
I *think* that this read can possibly be fused with the previous one,
and another READ_ONCE() should avoid that.
BTW it looks like this version gives slightly better results than the
previous one, perhpas due to the single-liked list usage?
Thanks!
Paolo
Powered by blists - more mailing lists