Thread (10 messages) 10 messages, 4 authors, 2003-09-22

Re: How best to bypass the page cache from within a kernel module?

From: William Lee Irwin III <hidden>
Date: 2003-09-17 19:50:44

On Wed, 2003-09-17 at 11:24, Alan Stern wrote:
quoted
However, all that seems rather roundabout.  An equally acceptable solution 
would be simply to invalidate all the entries in the page cache referring 
to my file, so that reads would be forced to go to the drive.  Can anyone 
tell me how to do that?
On Wed, Sep 17, 2003 at 12:44:29PM -0700, Dave Hansen wrote:
Whatever you're trying to do, you probably shouldn't be doing it in the
kernel to begin with.  Do it from userspace, it will save you a lot of
pain.
If you really want to bypass the pagecache etc. entirely, use raw io and
don't even bother mounting the filesystem, and do it all from userspace.
If you need it simultaneously mounted then you're in somewhat deeper
trouble, though you can probably be rescued by nefarious means like that
bit about shooting down the pagecache so you don't have some incoherent
cache headache.


-- wli
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help