Eric Dumazet eb6a24816b af_unix: reduce high order page allocations
unix_dgram_sendmsg() currently builds linear skbs, and this can stress
page allocator with high order page allocations. When memory gets
fragmented, this can eventually fail.

We can try to use order-2 allocations for skb head (SKB_MAX_ALLOC) plus
up to 16 page fragments to lower pressure on buddy allocator.

This patch has no effect on messages of less than 16064 bytes.
(on 64bit arches with PAGE_SIZE=4096)

For bigger messages (from 16065 to 81600 bytes), this patch brings
reliability at the expense of performance penalty because of extra pages
allocations.

netperf -t DG_STREAM -T 0,2 -- -m 16064 -s 200000
->4086040 Messages / 10s

netperf -t DG_STREAM -T 0,2 -- -m 16068 -s 200000
->3901747 Messages / 10s

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-03 16:43:18 -04:00
..
2012-04-02 04:33:44 -04:00
2012-04-02 04:33:44 -04:00
2012-04-02 04:33:44 -04:00
2012-04-02 04:33:41 -04:00
2012-04-02 04:33:42 -04:00
2011-12-11 18:25:16 -05:00
2012-04-02 04:33:41 -04:00
2011-09-16 19:20:20 -04:00
2012-04-02 04:33:41 -04:00
2012-04-01 18:43:25 -04:00
2012-04-01 18:11:37 -04:00
2012-04-01 18:11:37 -04:00
2012-04-01 18:11:37 -04:00
2012-03-08 13:52:08 -08:00
2012-03-23 08:53:47 -07:00
2012-04-01 18:11:37 -04:00
2011-12-16 15:49:52 -05:00
2012-04-01 18:11:36 -04:00