Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Oct 2005 16:40:20 -0700 (PDT)
From:      Don Lewis <truckman@FreeBSD.org>
To:        jhb@FreeBSD.org
Cc:        freebsd-hackers@FreeBSD.org, rwatson@FreeBSD.org, apelisse@gmail.com
Subject:   Re: freebsd-5.4-stable panics
Message-ID:  <200510022340.j92NeKWw016881@gw.catspoiler.org>
In-Reply-To: <200510020857.j928veaV014700@gw.catspoiler.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510022340.j92NeKWw016881>