Serious performance issues, broken initialization, and a likely fix

Maxim Sobolev sobomax at portaone.com
Sun Aug 14 13:30:08 GMT 2005


Ade Lovett wrote:
> Ade Lovett wrote:
> 
>>To cut a long story short, the order in which nswbuf is being
>>initialized is completely, totally, and utterly wrong -- this was
>>introduced by revision 1.132 of vm/vnode_pager.c just over 4 years ago.
> 
> 
> This is now logged as kern/84903 and, as the PR states, IMO 6.0 should
> *NOT* be released until a resolution is found to this problem.
> 
> The current misinitialization of nswbuf will affect *any* system where
> there are even a reasonable number of attempted concurrent disk reads.
> 
> I'm certainly willing to work with someone to get a definitive patch
> made, however we do *not* run HEAD here, only RELENG_6, so that will
> have to be taken into consideration.

I think kan has already committed a fix for that problem into HEAD.

-Maxim

kan         2005-08-13 20:21:34 UTC

   FreeBSD src repository

   Modified files:
     sys/kern             vfs_cluster.c
     sys/sys              buf.h
     sys/vm               vm_pager.c vnode_pager.c
   Log:
   Do not use vm_pager_init() to initialize vnode_pbuf_freecnt variable.
   vm_pager_init() is run before required nswbuf variable has been set
   to correct value. This caused system to run with single pbuf available
   for vnode_pager. Handle both cluster_pbuf_freecnt and vnode_pbuf_freecnt
   variable in the same way.

   Reported by:    ade
   Obtained from:  alc
   MFC after:      2 days

   Revision  Changes    Path
   1.167     +0 -6      src/sys/kern/vfs_cluster.c
   1.188     +2 -0      src/sys/sys/buf.h
   1.106     +1 -0      src/sys/vm/vm_pager.c
   1.223     +0 -9      src/sys/vm/vnode_pager.c




More information about the freebsd-current mailing list