NAND flash question

Artem B. Bityuckiy dedekind at infradead.org
Wed Jun 29 02:39:07 EDT 2005


On Tue, 2005-06-28 at 19:20 +0000, Sergei Sharonov wrote:
> Charles,
> > How could one change the flush interval to around 100mS?  Or does that sound 
> > like a stupid idea?
> 
> Just call sync/fsync as needed. Your application should know when to do it.
> Secondly, I believe JFFS2 will flush write buffer no latter then 5 s after 
> write (?). Can anybody comment on that?
> 
The write buffer flushing mechanism works as follows.

Every time something is written to the WB, the in-RAM superblock
structure object is marked as dirty (sb->s_dirt = 1). pdflush daemon is
the standard daemon which periodically wakes up and flushes dirty pages
and superblocks. So, the jffs2_write_super() will be called by pdflush
when the dirty interval is expired, and the WB will be flushed (and of
course, the s_dirty flag is cleaned). This flushing delay take a chance
that the next writes will be merged with the previous writes before the
WB is flushed.

The dirty expire interval is adjusted by means
of /proc/sys/vm/dirty_expire_centisecs
(seeDocumentation/filesystems/proc.txt) for details.

HTH.

-- 
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.





More information about the linux-mtd mailing list