From: Arnd Hannemann <arnd@arndnet.de>
To: Francis Moreau <francis.moro@gmail.com>
Cc: "linux-os (Dick Johnson)" <linux-os@analogic.com>,
linux-kernel@vger.kernel.org
Subject: Re: How to avoid data copies in a driver ?
Date: Thu, 15 May 2008 13:50:27 +0200 [thread overview]
Message-ID: <482C2383.5070206@arndnet.de> (raw)
In-Reply-To: <38b2ab8a0805150040s6933de14p7c2014945ba0810d@mail.gmail.com>
Francis Moreau wrote:
> Hello,
>
> On Wed, May 14, 2008 at 11:23 PM, linux-os (Dick Johnson)
> <linux-os@analogic.com> wrote:
>> You memory-map the data. Impliment mmap() in your driver.
>> You can also impliment poll() { select() } so your
>> application knows when new data are available.
>>
>> You cannot use a user-mode file-descriptor in the kernel.
>>
>
> Why not ?
http://kernelnewbies.org/FAQ/WhyWritingFilesFromKernelIsBad
>
> I'm suprised because what I need doens't seem so uncommon, usually
> devices send or
> receive data to/from files. So a helper (system call ?) to achieve
> that other than the basic
> read/write seems needed, no ?
Usually devices send or receive just data, and they shouldn't care about
file format, filesystems, permissions and all this stuff...
Regards,
Arnd
next prev parent reply other threads:[~2008-05-15 11:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 19:54 How to avoid data copies in a driver ? Francis Moreau
2008-05-14 20:02 ` Lennart Sorensen
2008-05-15 7:44 ` Francis Moreau
2008-05-15 13:59 ` Lennart Sorensen
2008-05-16 20:17 ` Francis Moreau
2008-05-14 21:23 ` linux-os (Dick Johnson)
2008-05-15 7:40 ` Francis Moreau
2008-05-15 11:50 ` Arnd Hannemann [this message]
2008-05-15 12:08 ` Francis Moreau
2008-05-15 13:16 ` linux-os (Dick Johnson)
2008-05-16 8:10 ` Jeremy Fitzhardinge
2008-05-16 11:44 ` Francis Moreau
2008-05-21 10:41 ` Pavel Machek
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=482C2383.5070206@arndnet.de \
--to=arnd@arndnet.de \
--cc=francis.moro@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-os@analogic.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