jffs2_scan_make_ino_cache() in scan.c very slow

Joakim Tjernlund joakim.tjernlund at lumentis.se
Thu Feb 21 11:14:19 EST 2002


> 
> joakim.tjernlund at lumentis.se said:
> >  Setting INOCACHE_HASHSIZE to 14(higher values makes it PANIC at
> > mount, don't know why) 
> 
> Possibly because the superblock union gets too big. What does it say when 
> it panics?
Kernel panic: VFS: Unable to mount root fs on 1f:04
> 
> > and changed the beginning of jffs2_scan_make_ino_cache() to {
> > is it OK to make *ic an static variable?
> 
> No - consider 'mount /opt & mount /usr' - it has to be per-filesystem. If
> it's this which really makes a difference, then we can add the pointer to
> the jffs2_sb_info. Can you make it keep a count of how many hits and misses
> there are, and print the counts when it's finished mounting?

Well, I already have counters to measure elapsed jiffies between entry and exit
of jffs2_scan_medium()

Here are the results:
Both optimizations: 1665 jiffies
extra cache and INOCACHE_HASHSIZE = 1: 2040 jiffies
no extra cache and INOCACHE_HASHSIZE = 14: 1813 jiffies
no optimization: ~3000 jiffies 

I think both are needed.

HZ is 200, this is on a mppc860, 80Mhz

 Jocke

> 
> > Now my mount time is just half of what it used to be!!(well almost :-)
> 
> Cool - can you try each of these changes on its own and measure the benefit
> of each? 
> 
> --
> dwmw2
> 
> 
> 





More information about the linux-mtd mailing list