[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <504C9EFCA2D0054393414C9CB605C37F20D90E3D@SJEXCHMB06.corp.ad.broadcom.com>
Date: Sat, 7 Sep 2013 01:45:10 +0000
From: "Dmitry Kravkov" <dmitry@...adcom.com>
To: "David Miller" <davem@...emloft.net>,
"mschmidt@...hat.com" <mschmidt@...hat.com>
cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"Ariel Elior" <ariele@...adcom.com>,
"Eilon Greenstein" <eilong@...adcom.com>
Subject: RE: [PATCH] bnx2x: avoid atomic allocations during
initialization
> -----Original Message-----
> From: netdev-owner@...r.kernel.org [mailto:netdev-
> owner@...r.kernel.org] On Behalf Of David Miller
> Sent: Friday, September 06, 2013 9:28 PM
> To: mschmidt@...hat.com
> Cc: netdev@...r.kernel.org; Ariel Elior; Eilon Greenstein
> 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.
>
Michal,
Once you allocated the memory during initialization , you will most probably fail to allocate its replacement during RX handling (on this machine).
This will cause packets to drop continuously (buffers which were allocated at init time will be returned to the ring).
I prefer driver to allow user to receive traffic in non TPA mode, than not receive traffic at all.
Thanks
Dmitry
> 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
--
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