Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/usr.sbin/pstat



On Sat, Nov 10, 2012 at 11:01:53AM +0000, Alan Barrett wrote:
> Module Name:  src
> Committed By: apb
> Date:         Sat Nov 10 11:01:52 UTC 2012
> 
> Modified Files:
>       src/usr.sbin/pstat: pstat.c
> 
> Log Message:
> The number of active vnodes may grow in between the sysctl call
> that figures out the size, and the sysctl call that fetches the data.
> 
> Previously, any growth at all would have resulted in this error message:
> 
>       pstat: sysctl: KERN_VNODE: Cannot allocate memory
> 
> Now allow for growth of 100 vnodes, or 5%, or both.  Growth in
> excess of 2% or 6000 vnodeshas been observed in practice.  Also
> ignore ENOMEM from the second sysctl call, in case the growth was
> even more than we anticipated.

Is the code assuming that the 2nd ENOMEM can only happen because the
result array isn't big enough?
Mayve it should verify that the last entry has been written to.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index