netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: mschmidt@redhat.com
Cc: netdev@vger.kernel.org, ariele@broadcom.com, eilong@broadcom.com
Subject: Re: [PATCH] bnx2x: avoid atomic allocations during initialization
Date: Fri, 06 Sep 2013 14:27:35 -0400 (EDT)	[thread overview]
Message-ID: <20130906.142735.458916282873797040.davem@davemloft.net> (raw)
In-Reply-To: <1378411989-19775-1-git-send-email-mschmidt@redhat.com>

From: Michal Schmidt <mschmidt@redhat.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@redhat.com>

This change looks good to me, if some Broadcom folks could take a look
and ACK/NACK that would be great.

Thanks.

  reply	other threads:[~2013-09-06 18:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-05 20:13 [PATCH] bnx2x: avoid atomic allocations during initialization Michal Schmidt
2013-09-06 18:27 ` David Miller [this message]
2013-09-07  1:45   ` Dmitry Kravkov
2013-09-07  4:29     ` David Miller
2013-09-07  9:07       ` Dmitry Kravkov
2013-09-08  1:48         ` David Miller
2013-09-09 12:20     ` Michal Schmidt
2013-09-11 19:44 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130906.142735.458916282873797040.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ariele@broadcom.com \
    --cc=eilong@broadcom.com \
    --cc=mschmidt@redhat.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).