Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jun 2007 15:25:29 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Jeff Roberson <jroberson@chesapeake.net>
Cc:        Attilio Rao <attilio@freebsd.org>, cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/sys/kern kern_mutex.c
Message-ID:  <200706051525.29852.jhb@freebsd.org>
In-Reply-To: <20070605121953.V606@10.0.0.1>
References:  <200706051857.l55IvAYP094328@repoman.freebsd.org> <200706051511.56553.jhb@freebsd.org> <20070605121953.V606@10.0.0.1>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 05 June 2007 03:20:42 pm Jeff Roberson wrote:
> On Tue, 5 Jun 2007, John Baldwin wrote:
> 
> > On Tuesday 05 June 2007 02:57:09 pm Attilio Rao wrote:
> >> attilio     2007-06-05 18:57:09 UTC
> >>
> >>   FreeBSD src repository
> >>
> >>   Modified files:
> >>     sys/kern             kern_mutex.c
> >>   Log:
> >>   Fix a problem with not-preemptive kernels caming from mis-merging of
> >>   existing code with the new thread_lock patch.
> >>   This also cleans up a bit unlock operation for mutexes.
> >>
> >>   Approved by: jhb, jeff(mentor)
> >
> > Specifically, this retires the explicit preemption code in mtx_unlock()
> > (inherited from BSD/OS) in the #ifndef PREEMPTION case.  We now only do
> > preemptions as a scheduling decision in the scheduler and only
> > #ifdef PREEMPTION.
> 
> I believe we also should replace thread_lock() and thread_unlock() with 
> calls to spinlock_enter()/exit() on !SMP and make thread_set_lock() a 
> no-op for this case.  Does that sounds right to everyone?

Probably.  spinlocks in general already do that.

-- 
John Baldwin



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