From: Matt Porter <mporter@kernel.crashing.org>
To: Shawn Jin <shawnxjin@gmail.com>
Cc: ppcembed <linuxppc-embedded@ozlabs.org>
Subject: Re: DMA consistent allocation is limited to 2MB on 2.6.11 for ppc440?
Date: Fri, 20 May 2005 13:16:20 -0700 [thread overview]
Message-ID: <20050520131620.B881@cox.net> (raw)
In-Reply-To: <c3d0340b050520111228a6f4cd@mail.gmail.com>; from shawnxjin@gmail.com on Fri, May 20, 2005 at 11:12:54AM -0700
On Fri, May 20, 2005 at 11:12:54AM -0700, Shawn Jin wrote:
> > My recommendation - don't do this. Why do you need to allocate this
> > big chunk of consistent memory in the first place? You can do DMA
> > _without_ allocating "consistent" memory. In fact, this is how
> > virtually all devices work in Linux. For more info about DMA API -
> > look at Documentation/DMA-API.txt.
>
> The driver stack we've been developing (already 4.0) uses consistent
> memory a lot for DMA. The stack is for many kinds of high performance
> storage IO e.g. iSCSI, FC. It works fine on 2.4.x because there is no
> such 2MB consistent pool limitation.
Why are you using consistent memory for your DMA buffers?
> > Technically, you can make consistent pool bigger, if you really insist
> > on using this approach.
>
> I want to understand the motivation and the rationale of choosing
> 'consistent_pte' on 2.6.x, what impact there would be to increase the
> consistent pool, and so on. Some pointers to articles, posts are more
> helpful.
The rationale on moving to the new implementation in 2.6 was to fix a
critical bug. The bug could not be fixed with a band-aid solution, but
required an allocation system with different semantics. After considering
a few possibilities the basic framework from ARM was selected.
The bug that was fixed was the inability to allocate consistent memory
from an interrupt context. This is allowed by the PCI DMA API and the
more general DMA API and is used by many drivers. In 2.4, these drivers
would simply BUG() on PPC4xx/8xx.
The difference with this implementation is that it doesn't allow for
arbitrarily huge consistent allocations by default. However, I carefully
placed a comment at the top to point people to the advanced setup
menu where they can tune the consistent pool to be larger than the
2MB default. You simply have to understand the memory map of your
board port when setting this option. You can break things as with
other advanced setup menu options.
-Matt
next prev parent reply other threads:[~2005-05-20 20:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-19 0:54 DMA consistent allocation is limited to 2MB on 2.6.11 for ppc440? Shawn Jin
2005-05-19 1:24 ` Eugene Surovegin
2005-05-19 1:52 ` Shawn Jin
2005-05-19 2:09 ` Eugene Surovegin
2005-05-20 18:12 ` Shawn Jin
2005-05-20 20:16 ` Matt Porter [this message]
2005-05-20 23:51 ` Shawn Jin
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=20050520131620.B881@cox.net \
--to=mporter@kernel.crashing.org \
--cc=linuxppc-embedded@ozlabs.org \
--cc=shawnxjin@gmail.com \
/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).