Re: [PATCH][BUGFIX][RFC] fix soft lock up at NFS mount by making limitation of dentry_unused

From: KOSAKI Motohiro
Date: Sat Mar 08 2008 - 03:33:18 EST


Hi makita-san

in general, I agreed with many people disallow >1min hang up.

> > No, we need a smarter free list structure. There have been several attempts
> > at this in the past. Two that I can recall off the top of my head:
> >
> > - per node unused LRUs
> > - per superblock unusued LRUs
>
> I know there is such attempt already, but they are not in main-line.
> I think this is not a smart but simple way to avoid this ploblem.

I think 2 improvement is not exclusive.
your patch is nice, but we need David's patch too.

because 2 patch purpose is different.

per superblock lru: improve typical performance.
limit of unused list: prevent too long hang up.

many time hang up happend at worst case even introduce per superblock lru.
and
unused list traversal doesn't improvement even introduce limit of unused list.

I hope both.


> >> Tested on Intel Itanium 2 9050 (dualcore) x12 MEM 24GB , kernel-2.6.25-rc4
> >> I found no peformance regression in my tests.
> >
> > Try something that relies on leaving the working set on the unused
> > list, like NFS server benchmarks that have a working set of tens of
> > million of files....
> >
> Okay, I'll try some benchmarks and report results...

good luck.


> spin_unlock(&dentry->d_lock);
> spin_unlock(&dcache_lock);
> + /* Prune unused dentry over threshold level */
> + int nr_in_use = (dentry_stat.nr_dentry - dentry_stat.nr_unused);
> + if (dentry_stat.nr_dentry > nr_in_use * (dentry_unused_ratio / 100))
> + prune_dcache(dentry_stat.nr_unused * 5 / 100 , NULL);
> return;

Why don't you make sysctl adjustable interface of dentry_unused_ratio?


- kosaki


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/