vnlur_proc lockups under high disk I/O

Gary Allan dragonfly at gallan.plus.com
Tue Feb 8 14:44:11 PST 2005


Matthew Dillon wrote:
     Gary, thanks for the cores!  They helped me track the problem down.

     It turns out to be a fairly simple bug in the kernel.  Basically what
     is going on here is that the vnode recycler is not allowed to recycle
     'internal' directory nodes in the namecache topology.  i.e. if the
     path A/B/C/D is cached, then the recycler is not allowed to remove A, B,
     or C.  The recycler checks this condition by checking the vnode's
     v_holdcnt.
     Unfortunately, it turns out that buffer cache buffers also bump
     v_holdcnt, not just the namecache.  This was preventing the recycler
     from recycling vnodes related to small files (e.g. the 'Root'
     and 'Entries' found all over a cvs checkout of src) and causing your
     lockup. 

     I believe this patch will solve the problem.   Please try it out
     and report back to the list.  Note that I have added some debugging
     printfs (which will not be in the final commit).
						-Matt

I've automated the extraction of the archive and it's been running for 2 
hours without problems. I've also stressed file creation as much as I 
can and all seems well.

It probably doesn't make a difference but after the tests I noticed that 
debug.numvnodes > kern.maxvnodes.

kern.maxvnodes: 16565
kern.minvnodes: 4141
debug.numvnodes: 16590
debug.freevnodes: 7550
debug.wantfreevnodes: 25
Thanks for the quick response.

Regards

Gary





More information about the Bugs mailing list