]> git.baikalelectronics.ru Git - kernel.git/commit
net: allow large number of tx queues
authorEric Dumazet <edumazet@google.com>
Thu, 20 Jun 2013 08:15:51 +0000 (01:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Jun 2013 06:56:55 +0000 (23:56 -0700)
commitb68aa76a0b2968bad34c2fce6d989ae5e3bdda44
treec949fd23e9a57d33a1597db4ad100ac2227fa19b
parentf28de0bec3b7b7919e9abab374c3e63d79c3630f
net: allow large number of tx queues

netif_alloc_netdev_queues() uses kcalloc() to allocate memory
for the "struct netdev_queue *_tx" array.

For large number of tx queues, kcalloc() might fail, so this
patch does a fallback to vzalloc().

As vmalloc() adds overhead on a critical network path, add __GFP_REPEAT
to kzalloc() flags to do this fallback only when really needed.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c