Re: [PATCH net-next 1/4] net: allow large number of rx queues

2014-11-20 Thread Pankaj Gupta
> On Tue, Nov 18, 2014 at 8:22 AM, Pankaj Gupta wrote: > > > > As vmalloc() adds overhead on a critical network path, > > __GFP_REPEAT flag is used with kzalloc() to do this fallback > > only when really needed. > > > > Are you sure we need __GFP_REPEAT? We have vmalloc() as > fallback of kmallo

Re: [PATCH net-next 1/4] net: allow large number of rx queues

2014-11-18 Thread Cong Wang
On Tue, Nov 18, 2014 at 8:22 AM, Pankaj Gupta wrote: > > As vmalloc() adds overhead on a critical network path, > __GFP_REPEAT flag is used with kzalloc() to do this fallback > only when really needed. > Are you sure we need __GFP_REPEAT? We have vmalloc() as fallback of kmalloc() in many places

[PATCH net-next 1/4] net: allow large number of rx queues

2014-11-18 Thread Pankaj Gupta
netif_alloc_rx_queues() uses kcalloc() to allocate memory for "struct netdev_queue *_rx" array. If we are doing large rx queue allocation kcalloc() might fail, so this patch does a fallback to vzalloc(). Similar implementation is done for tx queue allocation in netif_alloc_netdev_queues(). We avoi