[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130906.142735.458916282873797040.davem@davemloft.net>
Date: Fri, 06 Sep 2013 14:27:35 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: mschmidt@...hat.com
Cc: netdev@...r.kernel.org, ariele@...adcom.com, eilong@...adcom.com
Subject: Re: [PATCH] bnx2x: avoid atomic allocations during initialization
From: Michal Schmidt <mschmidt@...hat.com>
Date: Thu, 5 Sep 2013 22:13:09 +0200
> During initialization bnx2x allocates significant amounts of memory
> (for rx data, rx SGEs, TPA pool) using atomic allocations.
>
> I received a report where bnx2x failed to allocate SGEs and it had
> to fall back to TPA-less operation.
>
> Let's use GFP_KERNEL allocations during initialization, which runs
> in process context. Add gfp_t parameters to functions that are used
> both in initialization and in the receive path.
>
> Use an unlikely branch in bnx2x_frag_alloc() to avoid atomic allocation
> by netdev_alloc_frag(). The branch is taken several thousands of times
> during initialization, but then never more. Note that fp->rx_frag_size
> is never greater than PAGE_SIZE, so __get_free_page() can be used here.
>
> Signed-off-by: Michal Schmidt <mschmidt@...hat.com>
This change looks good to me, if some Broadcom folks could take a look
and ACK/NACK that would be great.
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists