From: Robert Hancock <hancockr@shaw.ca>
To: "Burkhard Schölpen" <bschoelpen@web.de>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: PCI DMA burst delay
Date: Fri, 30 Dec 2005 12:45:48 -0600 [thread overview]
Message-ID: <43B5805C.3060307@shaw.ca> (raw)
In-Reply-To: <397463649@web.de>
Burkhard Schölpen wrote:
> By the way, there is another question coming up to my mind. The pci card is to be designed for a large size copying machine (i.e. it is something like a framegrabber device which has to write out data to a printer simultaneously) which leads to really high bandwidth. For now I allocate the dma buffer in ram (a ringbuffer) using pci_alloc_consistent(), which unfortunately delimits the size to about 4 MB. However, it would be convenient to be able to allocate a larger dma buffer, because then we would be able to perform some image processing algorithms directly inside this buffer via mmapping it to user space. Is there any way to achieve this quite simple without being forced to use scatter/gather dma (our hardware is not able to do this - at least until now)?
Unfortunately if you need a memory buffer that is physically contiguous
to do DMA on, your choices are basically either pci_alloc_consistent, or
possibly boot-time allocation of memory by telling the kernel to use
less memory than is in the machine. Trying to allocate a big chunk of
contiguous memory after the system has come up will not be very reliable
since memory tends to become fragmented.
When dealing with this amount of data it really would be best to use
some form of scatter-gather DMA. Even if the hardware is not capable of
taking multiple addresses and doing the DMA on its own, you could sort
of fake it and tell it to do multiple transfers, one for each block of
memory - that might have some overhead though.
next prev parent reply other threads:[~2005-12-30 18:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-30 13:23 PCI DMA burst delay Burkhard Schölpen
2005-12-30 18:45 ` Robert Hancock [this message]
[not found] <5p7gt-3lu-5@gated-at.bofh.it>
2005-12-29 18:40 ` Robert Hancock
-- strict thread matches above, loose matches on Subject: below --
2005-12-29 16:03 Burkhard Schölpen
2005-12-29 16:55 ` Paul Fulghum
2005-12-29 14:43 Burkhard Schölpen
2005-12-29 15:23 ` Paul Fulghum
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=43B5805C.3060307@shaw.ca \
--to=hancockr@shaw.ca \
--cc=bschoelpen@web.de \
--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