From: Dan Malek <dan@embeddededge.com>
To: unlisted-recipients:; (no To-header on input)@localhost.localdomain
Cc: hozer@drgw.net, linux-kernel@vger.kernel.org, groudier@free.fr
Subject: Re: pci_alloc_consistent from interrupt == BAD
Date: Fri, 18 Jan 2002 16:43:01 -0500 [thread overview]
Message-ID: <3C4896E5.400@embeddededge.com> (raw)
In-Reply-To: <20020118130209.J14725@altus.drgw.net> <3C4875DB.9080402@embeddededge.com> <20020118.123221.85715153.davem@redhat.com>
David S. Miller wrote:
> If it specifies GFP_ATOMIC, there are no problems from interrupts.
> You will see that every port other than the mentioned two above use
> GFP_ATOMIC in their pci_alloc_consistent implementation, for this very
> reason.
The PowerPC does use (or is supposed to use) GFP_ATOMIC. I don't
know why ARM doesn't.
I guess I'm just trying to understand the value of calling it from interrupt.
If the purpose is to allocate a page of memory, and that doesn't happen,
all you have done is pushed added complexity to a device driver. If
an interrupt handler (and the remainder of the driver) must handle the
condition of wanting a page but not getting one in the interrupt handler,
why bother trying to do it at all?
> The ARM and PPC ports could set __GFP_HIGH in their page table
> allocation calls when invoked via pci_alloc_consistent,
How does this solve anything? All it does is make more memory potentially
available. If memory isn't available, the call is still going to fail.
> ...... It is a trivial fix whereas backing
> out this ability to call pci_alloc_consistent from interrupts is not
> a trivial change at all.
You can call pci_alloc_consistent from anywhere on any architecture,
but anyone calling it and not handling an error condition is a broken
implementation.
I have to apologize to hozer, because the allocation of page tables would
be a condition where pci_alloc_consistent could return an error. However,
he must be looking into the future because that is the way it will be
later today when I'm done changing the functions, not the current implementation.
Thanks.
-- Dan
next prev parent reply other threads:[~2002-01-18 21:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-18 19:02 pci_alloc_consistent from interrupt == BAD Troy Benjegerdes
2002-01-18 19:22 ` Dan Malek
2002-01-18 20:32 ` David S. Miller
2002-01-18 21:29 ` Russell King
2002-01-18 21:33 ` David S. Miller
2002-01-18 21:42 ` Russell King
2002-01-18 21:46 ` Dan Malek
2002-01-18 21:55 ` Russell King
2002-01-18 22:13 ` Dan Malek
2002-01-18 21:43 ` Dan Malek [this message]
2002-01-18 20:50 ` Gérard Roudier
[not found] ` <mailman.1011386221.24072.linux-kernel2news@redhat.com>
2002-01-21 23:52 ` Pete Zaitcev
2002-01-22 0:08 ` David S. Miller
2002-01-22 0:20 ` Pete Zaitcev
2002-01-18 20:21 ` Gérard Roudier
2002-01-18 20:38 ` David S. Miller
2002-01-18 21:07 ` Gérard Roudier
2002-01-18 21:13 ` David S. Miller
-- strict thread matches above, loose matches on Subject: below --
2002-01-19 17:21 David Brownell
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=3C4896E5.400@embeddededge.com \
--to=dan@embeddededge.com \
--cc=groudier@free.fr \
--cc=hozer@drgw.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox