tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Reduce contention on fstrans_lock



On Sat, Apr 04, 2020 at 02:37:44PM -0700, Jason Thorpe wrote:
 > +static int
 > +fstrans_lwp_ctor(void *arg, void *obj, int flags)
 > +{
 > +	struct fstrans_lwp_info *fli = obj;
 > +
 > +	memset(fli, 0, sizeof(*fli));
 > +	membar_sync();
 > +	mutex_enter(&fstrans_lock);
 > +	LIST_INSERT_HEAD(&fstrans_fli_head, fli, fli_list);
 > +	mutex_exit(&fstrans_lock);
 > +	return 0;
 > +}
 > 
 > That membar_sync() could be a membar_producer().

...which is subsumed by the membar_enter() inherent in mutex_enter()...

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index