public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Nikita V. Youshchenko" <yoush@cs.msu.su>
To: RKK <kulkarni.ravi4@gmail.com>
Cc: linux-kernel@vger.kernel.org, stefan@lvk.cs.msu.su
Subject: Re: high-order allocation + highmem + streaming DMA - possible?
Date: Wed, 19 Oct 2011 14:55:13 +0400	[thread overview]
Message-ID: <201110191455.15540@zigzag.lvk.cs.msu.su> (raw)
In-Reply-To: <CAM=x7SYGE50C7BHuEcSGpkC+aSPB143wYODktzEj4QsKcsRvMg@mail.gmail.com>

> > Hello.
> >
> > We are writing a driver for a custom PCI device that receives large
> > amount of data.
> >
> > Device is capable of DMAing received data in 64k chunks.
> >
> > We have been going to:
> > - use physically-continuous 64k-sized memory areas using alloc_pages()
> > with order=4,
> > - allocate large number of such areas on driver init,
> > - implement mmap() to map those all to userspace for zero-copy
> > processing, - use streaming DMA to actually receive data
>
>   May i know why u want to mmap to userspace instead of using a
> device? performance is affected by a large amount if u use mmap

mmap() is done once, at initialization time, for entire data buffer.
Later data is processed in zero-copy pattern.
I believe it is fastest possible solution.

> > Is there a way to use streaming DMA with large memory areas located in
> > highmem?
>
> I dont think DMA is available for highmem? Not sure though . never saw
> a usecase for it.

DMA is definitly available for highmem on per-page basis.
I'm interested in DMA of larger blocks.

Nikita

      reply	other threads:[~2011-10-19 10:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-19  6:45 high-order allocation + highmem + streaming DMA - possible? Nikita V. Youshchenko
2011-10-19 10:24 ` RKK
2011-10-19 10:55   ` Nikita V. Youshchenko [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=201110191455.15540@zigzag.lvk.cs.msu.su \
    --to=yoush@cs.msu.su \
    --cc=kulkarni.ravi4@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefan@lvk.cs.msu.su \
    /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