From: Russell King <rmk@arm.linux.org.uk>
To: "David S. Miller" <davem@redhat.com>
Cc: James.Bottomley@steeleye.com, linux-kernel@vger.kernel.org
Subject: Re: [BK-2.5] Update the generic DMA API to take GFP_ flags on
Date: Tue, 14 Jan 2003 15:51:05 +0000 [thread overview]
Message-ID: <20030114155105.A4077@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20030114.073023.89921980.davem@redhat.com>; from davem@redhat.com on Tue, Jan 14, 2003 at 07:30:23AM -0800
On Tue, Jan 14, 2003 at 07:30:23AM -0800, David S. Miller wrote:
> From: James Bottomley <James.Bottomley@steeleye.com>
> Date: Tue, 14 Jan 2003 10:30:15 -0500
>
> A GFP_KERNEL request is safely implemented as GFP_ATOMIC as long as the caller
> checks return for NULL. for dma_alloc_coherent return checking is a
> requirement because the system may return NULL anyway if it is out of mappings
> even with a GFP_KERNEL flag.
>
> Now what about the corollary, a platform that needs
> to sleep to setup the cpu mapings in a race-free manner?
>
> It could not ever honor GFP_ATOMIC in that case.
That got solved in recent 2.5, albiet with limit of 2MB of consistent /
coherent allocations at any one time. We return NULL if we run out of
space, and _all_ callers must check the return code of
pci_alloc_consistent and/or dma_alloc_coherent no matter what flags they
pass in.
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
prev parent reply other threads:[~2003-01-14 15:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-14 15:30 [BK-2.5] Update the generic DMA API to take GFP_ flags on James Bottomley
2003-01-14 15:30 ` David S. Miller
2003-01-14 15:51 ` James Bottomley
2003-01-14 15:51 ` Russell King [this message]
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=20030114155105.A4077@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=James.Bottomley@steeleye.com \
--cc=davem@redhat.com \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.