[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080515135901.GX7577@csclub.uwaterloo.ca>
Date: Thu, 15 May 2008 09:59:01 -0400
From: lsorense@...lub.uwaterloo.ca (Lennart Sorensen)
To: Francis Moreau <francis.moro@...il.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: How to avoid data copies in a driver ?
On Thu, May 15, 2008 at 09:44:37AM +0200, Francis Moreau wrote:
> So I would need to map this pointer into the kernel space, then fill it, take
> care of cache coherency, unmap the kernel pointer.
>
> Do you have any example of that in the kernel tree ?
I was asking if that would work. Does the to_user and from_user work on
a pointer from user space if that pointer points at a memory mapped
file?
> BTW, data are received in interrupt context. Is it safe to put them in mapped
> memory (can I have page fault ?) in this context ?
Oh I thought you just wanted user space to be able to ask for a chunk of
data. I wouldn't want to write to a file in an interrupt handler.
Compared to the disk I/O a memory copy sounds rather insignificant to
the overall process.
--
Len Sorensen
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists