]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: sk_forced_mem_schedule() optimization
authorEric Dumazet <edumazet@google.com>
Sat, 11 Jun 2022 03:30:16 +0000 (20:30 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Jun 2022 12:35:25 +0000 (13:35 +0100)
commit08c1c1f449b1aa74e7a7ad6216a218e60846a6d9
treecf2ec0a5c25c90def3f59acc871d490b4aa3afba
parent29b984e9a8e74066ba9a3d96d2404d50e248c475
tcp: sk_forced_mem_schedule() optimization

sk_memory_allocated_add() has three callers, and returns
to them @memory_allocated.

sk_forced_mem_schedule() is one of them, and ignores
the returned value.

Change sk_memory_allocated_add() to return void.

Change sock_reserve_memory() and __sk_mem_raise_allocated()
to call sk_memory_allocated().

This removes one cache line miss [1] for RPC workloads,
as first skbs in TCP write queue and receive queue go through
sk_forced_mem_schedule().

[1] Cache line holding tcp_memory_allocated.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h
net/core/sock.c