[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ba7a0854-6841-2ebc-c329-4c13f1a997df@huawei.com>
Date: Thu, 2 Sep 2021 08:47:51 +0800
From: Yunsheng Lin <linyunsheng@...wei.com>
To: <davem@...emloft.net>, <kuba@...nel.org>, <edumazet@...gle.com>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linuxarm@...neuler.org>, <yoshfuji@...ux-ipv6.org>,
<dsahern@...nel.org>
Subject: Re: [PATCH net-next] tcp: add tcp_tx_skb_cache_key checking in
sk_stream_alloc_skb()
On 2021/9/1 18:39, Yunsheng Lin wrote:
> Since tcp_tx_skb_cache is disabled by default in:
> commit 0b7d7f6b2208 ("tcp: add tcp_tx_skb_cache sysctl")
>
> Add tcp_tx_skb_cache_key checking in sk_stream_alloc_skb() to
> avoid possible branch-misses.
>
> Signed-off-by: Yunsheng Lin <linyunsheng@...wei.com>
> ---
> Also, the sk->sk_tx_skb_cache may be both changed by allocation
> and freeing side, I assume there may be some implicit protection
> here too, such as the NAPI protection for rx?
Hi, Eric
Is there any implicit protection for sk->sk_tx_skb_cache?
As my understanding, sk_stream_alloc_skb() seems to be protected
by lock_sock(), and the sk_wmem_free_skb() seems to be mostly
happening in NAPI polling for TCP(when ack packet is received)
without lock_sock(), so it seems there is no protection here?
>
Powered by blists - more mailing lists