slram and buffer cache

Tobias Otto-Adamczak toa at
Fri Dec 13 04:54:24 EST 2002

Jochen Schaeuble, 2002-12-12, 21:28h:

> Hi,
> I haven't used mtdblock for a while now so I'm not absolutely sure if
> this is correct. The "cache_size" of the mtdblock driver is initialized
> with the erasesize specified in the slram driver (0x10000 if you haven't
> changed anything). If you want uncached operation you should set this
> value to
> (*curmtd)->mtdinfo->erasesize = 0x0; (slram.c line 180).
> I had no time to check this but from reading the source I think this is
> correct. Please let me know if this works for you. If so it might be a
> good idea to make this size configurable.

Thanks for your reply. I use the latest version of slram.c from which you can look at

Line 206 says already (*curmtd)->mtdinfo->erasesize = 0x0; I know that
other (older) versions of this file have the value 0x10000 here.

However I have added printk()s to slram_read/slram_write to see when
they are actually called and there is a lot of latency (several seconds)
between writing some bytes into a file and see some slram driver
activity. So there must be another point that I'm missing.

I tried to mount with -o sync and also tuned the bdflush parameters,
both helped a little bit to speed up the write process for cached
buffers, but I definitely want to get rid of the caching at all for my

Any more ideas ?


More information about the linux-mtd mailing list