slram and buffer cache
psionic at psionic.de
Thu Dec 12 15:28:14 EST 2002
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
(*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.
On Wed, Dec 11, 2002 at 08:23:02PM +0100, Tobias Otto-Adamczak wrote:
> I have a custom board with 32MB SDRAM, 16MB Flash and 512K SRAM here. I
> use the slram driver to access the SRAM (which isn't used otherwise by
> the kernel). I created an 512K ext2 fs image and copied it to the SRAM
> using an mtd char dev. I was able to mount this SRAM area as a mtd block
> device (using mtdblock_ro) and read/write files to the ext2 fs.
> My problem is the buffer cache for the block devices. I do not want
> write operations to the SRAM being delayed. What can I do to avoid that
> ? I searched for some hours today but to no avail.
> [maybe OT for this list]
> How is this problem solved for "normal" ram disks ?
More information about the linux-mtd