lkml.org 
[lkml]   [2008]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How to avoid data copies in a driver ?
On Thu, May 15, 2008 at 1:50 PM, Arnd Hannemann <arnd@arndnet.de> wrote:
> 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
>

ok, relayfs might be what I need, thanks.

>>
>> 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...
>

The fact is that the data usually ends into a file.

thanks
--
Francis


\
 
 \ /
  Last update: 2008-05-15 14:11    [W:0.043 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site