Files
linux/net
Eric Dumazet 270acefafe net: sk_free_datagram() should use sk_mem_reclaim_partial()
I noticed a contention on udp_memory_allocated on regular UDP applications.

While tcp_memory_allocated is seldom used, it appears each incoming UDP frame
is currently touching udp_memory_allocated when queued, and when received by
application.

One possible solution is to use sk_mem_reclaim_partial() instead of
sk_mem_reclaim(), so that we keep a small reserve (less than one page)
of memory for each UDP socket.

We did something very similar on TCP side in commit
9993e7d313
([TCP]: Do not purge sk_forward_alloc entirely in tcp_delack_timer())

A more complex solution would need to convert prot->memory_allocated to
use a percpu_counter with batches of 64 or 128 pages.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-05 01:38:06 -08:00
..
2008-11-03 18:23:09 -08:00
2008-11-03 18:21:05 -08:00
2008-11-03 18:21:05 -08:00
2008-10-31 00:54:56 -07:00
2008-11-03 18:21:05 -08:00
2008-11-03 18:21:05 -08:00
2008-11-03 18:21:05 -08:00
2008-11-03 18:21:05 -08:00
2008-11-03 18:21:05 -08:00
2008-11-03 18:21:05 -08:00
2008-11-03 18:21:05 -08:00
2008-09-30 03:03:35 -07:00
2008-10-10 14:07:03 -07:00
…
2008-11-03 18:21:05 -08:00
2008-11-03 18:21:05 -08:00
2008-10-31 00:54:56 -07:00
2008-11-03 18:21:05 -08:00
2008-11-03 18:21:05 -08:00
2008-11-03 18:21:05 -08:00
2008-10-31 00:54:56 -07:00
2008-11-03 18:21:05 -08:00
2008-10-27 17:06:18 -07:00
2008-11-03 18:21:05 -08:00
2008-11-03 18:21:05 -08:00
2008-10-31 00:54:56 -07:00
2008-07-24 10:47:27 -07:00
…
2008-11-03 18:23:09 -08:00
…