* slram and buffer cache
@ 2002-12-11 19:23 Tobias Otto-Adamczak
2002-12-12 20:28 ` Jochen Schaeuble
0 siblings, 1 reply; 3+ messages in thread
From: Tobias Otto-Adamczak @ 2002-12-11 19:23 UTC (permalink / raw)
To: linux-mtd; +Cc: Jochen Schaeuble
Hi,
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 ?
Regards
Tobias
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: slram and buffer cache
2002-12-11 19:23 slram and buffer cache Tobias Otto-Adamczak
@ 2002-12-12 20:28 ` Jochen Schaeuble
2002-12-13 9:54 ` Tobias Otto-Adamczak
0 siblings, 1 reply; 3+ messages in thread
From: Jochen Schaeuble @ 2002-12-12 20:28 UTC (permalink / raw)
To: Tobias Otto-Adamczak; +Cc: linux-mtd
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.
Greets,
Jochen
On Wed, Dec 11, 2002 at 08:23:02PM +0100, Tobias Otto-Adamczak wrote:
> Hi,
>
> 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 ?
>
> Regards
> Tobias
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: slram and buffer cache
2002-12-12 20:28 ` Jochen Schaeuble
@ 2002-12-13 9:54 ` Tobias Otto-Adamczak
0 siblings, 0 replies; 3+ messages in thread
From: Tobias Otto-Adamczak @ 2002-12-13 9:54 UTC (permalink / raw)
To: linux-mtd; +Cc: Jochen Schaeuble
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
http://www.linux-mtd.infradead.org/ which you can look at
ftp://ftp.uk.linux.org/pub/people/dwmw2/mtd/cvs/mtd/drivers/mtd/devices/slram.c
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
BB-SRAM.
Any more ideas ?
Regards
Tobias
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-12-13 9:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-11 19:23 slram and buffer cache Tobias Otto-Adamczak
2002-12-12 20:28 ` Jochen Schaeuble
2002-12-13 9:54 ` Tobias Otto-Adamczak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox