[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f21da0d8-fdad-f98a-62c6-6ab8a84b8e75@gmail.com>
Date: Tue, 22 Dec 2020 09:49:19 -0700
From: David Ahern <dsahern@...il.com>
To: Willem de Bruijn <willemdebruijn.kernel@...il.com>,
Jonathan Lemon <jonathan.lemon@...il.com>
Cc: Network Development <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
Kernel Team <kernel-team@...com>
Subject: Re: [PATCH 04/12 v2 RFC] skbuff: Push status and refcounts into
sock_zerocopy_callback
On 12/22/20 7:43 AM, Willem de Bruijn wrote:
>
>> void sock_zerocopy_put(struct ubuf_info *uarg)
>> {
>> - if (uarg && refcount_dec_and_test(&uarg->refcnt))
>> + if (uarg)
>> uarg->callback(uarg, uarg->zerocopy);
>> }
>> EXPORT_SYMBOL_GPL(sock_zerocopy_put);
>
> This does increase the number of indirect function calls. Which are
> not cheap post spectre.
>
> In the common case for msg_zerocopy we only have two clones, one sent
> out and one on the retransmit queue. So I guess the cost will be
> acceptable.
>
sock_zerocopy_callback seems to be the only one at the moment - or the
most dominant if I goofed my search. Could use the INDIRECT_CALL macros
for it.
Powered by blists - more mailing lists