Re: [patch] ramdisk blocksize

Andrea Arcangeli (andrea@suse.de)
Fri, 20 Aug 1999 19:37:53 +0200 (CEST)


On Fri, 20 Aug 1999, Bradley D. LaRonde wrote:

>All of the tests that I've seen say that it is broken post 2.3.6. I've

No suprirse. It's what I expected.

>1. Is the page cache just to improve latency, or does it server another
>purpose or purposes?

Hmm what do you mean exactly? I guess you don't want as reply like "the
page cache is there to avoid you having to read from disk every time" ;).

>2. Is it necessary (or good) for ramdisk access to go through the page
>cache, or would it be better to "turn it off" somehow for the ramdisk?

It's necessary in 2.3.x because now writes goes into the page cache.

>3. Do you know if the page cache is positioned to replace the buffer cache
>eventually?

No, the only object of the page cache is to have file data into it. Also
the page cache is necessary for mmaps, that's why the page cache is
at least PAGE_SIZE wide and not blocksize wide.

>The specific symptoms of the ramdisk problem: The filesystem is recognized,
>mounts properly, directory reads are OK, but file reads return bogus data.
>When using ramdisk as root, the kernel fails with "Kernel panic: No init

It's because we read and write the image using the blockdevice access. So
we read from buffers and we write to buffers. But then in the pagecache
code we don't read from the ramdisk protected buffers since
block_read_full_page() create the new buffers from the empty page cache.

I'll work on this now...

Andrea

PS. In the weekend make sure to always reply to me via linux-kernel (or
better x-linux-kernel these days) since my email will be down this weekend
but I'll continue to read the mailing list. (otherwise I'll read your
emails only on Monday ;)

-
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/