public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pete Zaitcev <zaitcev@redhat.com>
To: "Lee, Shuyu" <SLee@cognex.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: How to DMA data from a pci device to a user buffer directly
Date: Mon, 5 May 2003 16:58:39 -0400	[thread overview]
Message-ID: <200305052058.h45Kwd800522@devserv.devel.redhat.com> (raw)
In-Reply-To: <mailman.1052164262.6444.linux-kernel2news@redhat.com>

> 5) My DMA controller has unlimited scatter-gather capability.

> By the way, I have tested the rest of my code by DMA the image data to a
> kernel buffer allocated using kmalloc() first, then do a memcpy() to copy
> the image data to a user buffer. This alternative seems to work fine.

Use mmap to make the kmalloc-ed buffer available to user
application without the overhead of memcpy().

It is very wonderful that you can do s/g, so on the next stage
you can kmalloc a bunch of blocks with small order (1) and use
those instead of relying on bootmem allocation and Pauline's
bigphysarea patch. Most older controllers cannot do it.

-- Pete

       reply	other threads:[~2003-05-05 20:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1052164262.6444.linux-kernel2news@redhat.com>
2003-05-05 20:58 ` Pete Zaitcev [this message]
2003-05-05 19:49 How to DMA data from a pci device to a user buffer directly Lee, Shuyu

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=200305052058.h45Kwd800522@devserv.devel.redhat.com \
    --to=zaitcev@redhat.com \
    --cc=SLee@cognex.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox