netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH net-next v5 1/2] net: Add a second bind table hashed by port and address
       [not found] <20220518231912.2891175-2-joannelkoong@gmail.com>
@ 2022-05-19  7:51 ` Kuniyuki Iwashima
  2022-05-19 15:54   ` Jakub Kicinski
  0 siblings, 1 reply; 2+ messages in thread
From: Kuniyuki Iwashima @ 2022-05-19  7:51 UTC (permalink / raw)
  To: joannelkoong
  Cc: davem, dsahern, edumazet, kafai, kuba, kuniyu, pabeni,
	richard_siegfried, yoshfuji, netdev, dccp

From: Joanne Koong <joannelkoong@gmail.com>
Date: Wed, 18 May 2022 16:19:11 -0700
> We currently have one tcp bind table (bhash) which hashes by port
> number only. In the socket bind path, we check for bind conflicts by
> traversing the specified port's inet_bind2_bucket while holding the
> bucket's spinlock (see inet_csk_get_port() and inet_csk_bind_conflict()).
> 
> In instances where there are tons of sockets hashed to the same port
> at different addresses, checking for a bind conflict is time-intensive
> and can cause softirq cpu lockups, as well as stops new tcp connections
> since __inet_inherit_port() also contests for the spinlock.
> 
> This patch proposes adding a second bind table, bhash2, that hashes by
> port and ip address. Searching the bhash2 table leads to significantly
> faster conflict resolution and less time holding the spinlock.
> 
> Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
> Reviewed-by: Eric Dumazet <edumazet@google.com>

Acked-by: Kuniyuki Iwashima <kuniyu@amazon.co.jp>

To maintainers:
lore and patchwork seem to miss this version...?

Thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next v5 1/2] net: Add a second bind table hashed by port and address
  2022-05-19  7:51 ` [PATCH net-next v5 1/2] net: Add a second bind table hashed by port and address Kuniyuki Iwashima
@ 2022-05-19 15:54   ` Jakub Kicinski
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2022-05-19 15:54 UTC (permalink / raw)
  To: Kuniyuki Iwashima
  Cc: joannelkoong, davem, dsahern, edumazet, kafai, pabeni,
	richard_siegfried, yoshfuji, netdev, dccp

On Thu, 19 May 2022 16:51:19 +0900 Kuniyuki Iwashima wrote:
> To maintainers:
> lore and patchwork seem to miss this version...?

Yeah :( We're trying to debug with Joanne and the vger admin,
if we can't fix it by the end of the day I'll just merge the
last posting that made it thru, IIRC the patches are identical.

Thanks for the review!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-19 15:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20220518231912.2891175-2-joannelkoong@gmail.com>
2022-05-19  7:51 ` [PATCH net-next v5 1/2] net: Add a second bind table hashed by port and address Kuniyuki Iwashima
2022-05-19 15:54   ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).