svn commit: r264321 - head/sys/netinet

John Baldwin jhb at freebsd.org
Fri Apr 11 18:23:09 UTC 2014


On Friday, April 11, 2014 6:56:16 am Bjoern A. Zeeb wrote:
> On 10 Apr 2014, at 18:15 , John Baldwin <jhb at FreeBSD.org> wrote:
> 
> > +/* Global timewait lock */
> > +static VNET_DEFINE(struct rwlock, tw_lock);
> > +#define	V_tw_lock			VNET(tw_lock)
> 
> Why do we virtualise individual locks now?   Usually we only do for those 
embedded into larger virtualised data structures?  Does this align with an 
independently virtualised data structure (in which case the lock should be 
part of that)?

The larger structure is currently a single TAILQ:

static VNET_DEFINE(TAILQ_HEAD(, tcptw), twq_2msl);
#define	V_twq_2msl			VNET(twq_2msl)

Would seem overkill to make a separate struct just for the TAILQ_HEAD and
lock?

-- 
John Baldwin


More information about the svn-src-head mailing list