lord latex wrote:
>
> hi
>
> i've got written a block device driver for the 2.4.x
> kernel and it seems to work. but something looks
> strange to me. i've go a very simple application that
> does nothing more then open the block device, read
> 1024 byte and close the device. when i run this app.
> serveral times my do_request function gets called
> every time. why? i expect this block beeing buffered
> in the buffer cache. what do i don't see, or what is
> possibly wrong with my block device?
>
The kernel invalidates the device's cache on the final close.
If you hold the device open in a different process:
sleep 1000 < /dev/foo
while you run the test, you'll see that the underlying device's
contents are indeed cached.
-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Thu Feb 07 2002 - 21:00:44 EST