take 2: request for review: backport of sx and rwlocks from 7.0
to 6-stable
John Baldwin
jhb at freebsd.org
Wed Sep 19 08:45:19 PDT 2007
On Monday 03 September 2007 10:31:52 pm Alfred Perlstein wrote:
> Updated patch attached:
>
> sizeof(struct sx) should be the same.
> garbage removed from kern_sx.c.
> alignment of "struct thread" set to constant rather than magic number.
> uma_zalloc of "struct thread" fixed to use constant.
I would not add gratuitous diffs to HEAD (the thread alignment thing). If you
want to change that, you should change it in HEAD first. I would keep the
diffs with HEAD minimal in the MFC though as it makes backporting future
fixes easier.
I would add new fields to 'struct thread' at the bottom of the structure in
6.x to minimize ABI trauma. I think if you put td_tsqueue before td_locks
you will actually not adjust the ABI since there should be a "hole" for a
char there due to alignment already.
The locking notes for the new fields in 'struct thread' should be (j) not (t).
(t) doesn't exist in 6.x.
I'm not sure what the debug.turnstile_nullowners thing is (maybe added with
threadlock?) but it probably isn't relevant to 6.x.
Why did you remove the 'show sleepq' DDB command completely? It's very
useful. :(
6.x already has a LOCK_CLASS() macro in sys/lock.h. No need to duplicate it
in kern_sx.c.
--
John Baldwin
More information about the freebsd-smp
mailing list