Re: how to bypass buffer cache for a block device driver

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sat, 7 Aug 1999 14:48:28 +0100 (BST)


> Is it possible to bypass the buffer cache completely
> for a block device driver? What should I do?

No

> Is it possible to bypass only for some processes and
> let thro for others? (This is the final behaviour I want.)

It is up to the process to specify O_SYNC on the files it wishes to sync.
Even then the Linux kernel will do read caching. The page cache shares pages
between user space and the kernel when running binaries for example.

Also regardless of how good the cache on your custom device is the main memory
is referenced without a copy in read only cases so will be faster than a copy
even from static ram, or a DMA.

Alan

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