From: Stas Sergeev <stsp@aknet.ru>
To: Linux kernel <linux-kernel@vger.kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Subject: vmsplice from mmapped DMA buffer
Date: Tue, 29 Mar 2011 15:25:01 +0400 [thread overview]
Message-ID: <4D91C18D.8030701@aknet.ru> (raw)
Hi.
I'm trying to use vmsplice() to speed up the transfer
from the mmapped DMA buffer, and read it by another process.
As it seems to me, right now this is not really possible:
if the pipe reader lags, the DMA will overwrite the pages
that were not yet transferred. And I can't pause the DMA,
because it transfers the incoming realtime data stream.
So right now I am using the classic read/write, but that's
a huge CPU load.
Is there any way to achieve the reliable results with vmsplice?
If right now vmsplice cannot be reliably used to transfer
from the non-pausible DMA buffer, then I can think of the
following extensions (flags) to it:
- VMSPLICE_F_QUERY_PENDING: returns the number of bytes
still pending for IO, within the specified memory areas.
- VMSPLICE_F_VACATE: vacate the specified memory areas
from the pending IO, if any. By copying the pending data to the
kernel buffer.
- VMSPLICE_F_FLUSH: block until there is no more pending
IO for the specified memory areas.
- VMSPLICE_F_ASYNC: give SIGIO when the specified memory
areas are completely xferred and consumed by the reader.
Well, this flags will not play well with the existing vmsplice(),
so basically this is a brain-storming.
Anyway, are there any suggestions about vmsplicing from
the DMA buffer? Or, if not yet possible - what have to be done
to get there?
reply other threads:[~2011-03-29 11:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4D91C18D.8030701@aknet.ru \
--to=stsp@aknet.ru \
--cc=axboe@kernel.dk \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.