freebsd-5.4-stable panics

Don Lewis truckman at FreeBSD.org
Sun Oct 2 16:40:31 PDT 2005


On  2 Oct, Don Lewis wrote:

> It turns out that fill_kinfo_thread() grabs a bunch of locks to grab
> things out of struct proc, which breaks badly if sched_lock is grabbed
> before calling fill_kinfo_thread().
> 
> I refactored fill_kinfo_thread() into two functions, one of which
> doesn't need any additional locks and only gathers per-thread data, and
> a new function, fill_kinfo_proc_only(), which gathers the data that is
> common to all theads and can be called before grabbing sched_lock.  This
> should be more efficient if there is more than one thread because the
> per-process data is only gathered once, and only the per-thread data in
> kinfo_proc is overwritten for each thread.

[ snip ]

After fixing a few whitespace nits and one minor buglet, I commited my
patch to HEAD, in kern_proc.c 1.232.  I hope to be able to MFC it soon.



More information about the freebsd-hackers mailing list