Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Sep 2007 11:06:28 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Alfred Perlstein <alfred@freebsd.org>
Cc:        attilio@freebsd.org, smp@freebsd.org
Subject:   Re: take 2: request for review: backport of sx and rwlocks from 7.0 to 6-stable
Message-ID:  <200709191106.28974.jhb@freebsd.org>
In-Reply-To: <20070904023152.GZ87451@elvis.mu.org>

index | next in thread | previous in thread | raw e-mail

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


help

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