Re: How to avoid data copies in a driver ?

From: Lennart Sorensen
Date: Wed May 14 2008 - 16:03:39 EST


On Wed, May 14, 2008 at 09:54:03PM +0200, Francis Moreau wrote:
> Hello,
>
> I'd like to optimize my driver, which receives data through a fifo and gives
> them to a user space application. In turns this application moves this data
> into a file.
>
> To avoid several useless copies, I'd like the application to pass to the driver
> a file descriptor (?) to the driver and then the driver can directly move the
> received data to that file.
>
> Could anybody give me some example of such scheme ?

If the application memory mapped the file, would it be able to simply
pass a pointer to that mapped file as part of the call to the driver and
the driver would place the data directly at the requested location which
would then be directly to the file?

--
Len Sorensen
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/