netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: David Miller <davem@davemloft.net>
Cc: peterz@infradead.org, kosaki.motohiro@jp.fujitsu.com,
	akpm@linux-foundation.org, csnook@redhat.com,
	davej@codemonkey.org.uk, nickpiggin@yahoo.com.au,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: GFP_ATOMIC page allocation failures.
Date: Wed, 02 Apr 2008 15:06:43 -0400	[thread overview]
Message-ID: <47F3D943.5040201@garzik.org> (raw)
In-Reply-To: <20080402.114545.17950613.davem@davemloft.net>

David Miller wrote:
> From: Peter Zijlstra <peterz@infradead.org>
> Date: Wed, 02 Apr 2008 13:04:59 +0200
> 
>> Would we not hope that most net drivers can handle {,net}dev_alloc_skb()
>> failing? Otherwise we have some serious trouble.
> 
> False presumption.
> 
> Most can but some legacy ones really do not handle this well.

Correct...

In addition, I remain worried about potential edge cases in drivers that 
do "burst refill" style allocations, rather than the [IMO safer] 
as-you-go style that tg3 employs.

I haven't done a serious audit, but I have nagging doubts about the 
behavior of burst-refill drivers when faced with a burst of failed 
allocations...  do they stop DMA operation, or do they permit hardware 
to wander into part of the DMA ring where, in the previous "cycle" 
through the ring, valid DMA addresses were placed.  But now with a 
string of allocation failures, you have a sequence of DMA ring 
descriptors that point to invalid memory.  If the DMA engine is not 
stopped, or in some other way made to avoid those invalid DMA 
descriptors, then you can easily run into problems.

Sometimes, it's as easy as making sure to properly police the 'OWN' bit 
of each descriptor, something easily and commonly done as a matter of 
course.  But modern hardware with multi-descriptor packets make things 
more complex, so it is actually getting more difficult to get these 
details right.

</ramble>

	Jeff



  reply	other threads:[~2008-04-02 19:07 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080401235609.GA6947@codemonkey.org.uk>
     [not found] ` <200804021228.16875.nickpiggin@yahoo.com.au>
     [not found] ` <47F32789.2070703@redhat.com>
     [not found]   ` <20080402005646.f8df1c1b.akpm@linux-foundation.org>
2008-04-02  8:17     ` GFP_ATOMIC page allocation failures KOSAKI Motohiro
2008-04-02  8:24       ` David Miller
2008-04-02  8:43         ` Andrew Morton
2008-04-02 10:00         ` KOSAKI Motohiro
2008-04-02 10:56           ` KOSAKI Motohiro
2008-04-02 18:44             ` David Miller
2008-04-02 20:12               ` Michael Chan
2008-04-02 20:53                 ` David Miller
2008-04-02 11:04         ` Peter Zijlstra
2008-04-02 18:45           ` David Miller
2008-04-02 19:06             ` Jeff Garzik [this message]
     [not found]     ` <200804022012.58760.nickpiggin@yahoo.com.au>
2008-04-02 15:54       ` Andrew Morton
2008-04-03  5:22         ` Nick Piggin
2008-04-03  5:32           ` Andrew Morton
2008-04-03  8:59             ` Evgeniy Polyakov
2008-06-26 21:06               ` Dave Jones
2008-06-26 22:26                 ` Chris Snook
2008-06-27 10:01                 ` Evgeniy Polyakov
2008-04-02 17:21     ` Jeff Garzik
2008-04-02 17:33       ` Andrew Morton
2008-04-02 18:18         ` Jeff Garzik
2008-04-02 18:37           ` Kok, Auke
2008-04-03  5:57           ` Nick Piggin
2008-04-03 18:20             ` Jeff Garzik
     [not found] <adYyJ-20N-11@gated-at.bofh.it>
     [not found] ` <aef6w-6rx-45@gated-at.bofh.it>
     [not found]   ` <aefJ9-7KR-15@gated-at.bofh.it>
     [not found]     ` <aeqF6-45P-29@gated-at.bofh.it>
2008-04-04  9:52       ` Bodo Eggert
2008-04-04 10:59         ` Nick Piggin
2008-04-04 11:35           ` Bodo Eggert
2008-04-05  1:06             ` Nick Piggin
2008-04-06 12:12               ` Bodo Eggert

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=47F3D943.5040201@garzik.org \
    --to=jeff@garzik.org \
    --cc=akpm@linux-foundation.org \
    --cc=csnook@redhat.com \
    --cc=davej@codemonkey.org.uk \
    --cc=davem@davemloft.net \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=peterz@infradead.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).