[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iJq1mZepnW3XMPOP298ZxoPF8Rwy0Em-NKwYs+CMUo9nw@mail.gmail.com>
Date: Tue, 26 Apr 2022 09:13:39 -0700
From: Eric Dumazet <edumazet@...gle.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH v2 net-next] net: generalize skb freeing deferral to
per-cpu lists
On Tue, Apr 26, 2022 at 8:28 AM Paolo Abeni <pabeni@...hat.com> wrote:
>
> I'm unsure I explained my doubt in a clear way: what I fear is that the
> compiler could emit a single read instruction, corresponding to the
> READ_ONCE() outside the lock, so that the spin-locked section will
> operate on "old" defer_list.
>
> If that happens we could end-up with 'defer_count' underestimating the
> list lenght. It looks like that is tolerable, as we will still be
> protected vs defer_list growing too much.
defer_count is always read/written under the protection of the spinlock.
It must be very precise, unless I am mistaken.
>
> Acked-by: Paolo Abeni <pabeni@...hat.com>
>
>
Thanks !
Powered by blists - more mailing lists