[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47F3D943.5040201@garzik.org>
Date: Wed, 02 Apr 2008 15:06:43 -0400
From: Jeff Garzik <jeff@...zik.org>
To: David Miller <davem@...emloft.net>
CC: peterz@...radead.org, kosaki.motohiro@...fujitsu.com,
akpm@...ux-foundation.org, csnook@...hat.com,
davej@...emonkey.org.uk, nickpiggin@...oo.com.au,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: GFP_ATOMIC page allocation failures.
David Miller wrote:
> From: Peter Zijlstra <peterz@...radead.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists