From owner-cvs-all@FreeBSD.ORG Tue Jun 5 19:27:04 2007 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 95DE316A421; Tue, 5 Jun 2007 19:27:04 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id 3E39513C46C; Tue, 5 Jun 2007 19:27:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l55JQqDA030227; Tue, 5 Jun 2007 15:26:52 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Jeff Roberson Date: Tue, 5 Jun 2007 15:25:29 -0400 User-Agent: KMail/1.9.6 References: <200706051857.l55IvAYP094328@repoman.freebsd.org> <200706051511.56553.jhb@freebsd.org> <20070605121953.V606@10.0.0.1> In-Reply-To: <20070605121953.V606@10.0.0.1> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200706051525.29852.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 05 Jun 2007 15:26:52 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3362/Tue Jun 5 13:02:53 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Attilio Rao , cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/kern kern_mutex.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2007 19:27:04 -0000 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