From owner-freebsd-arch@FreeBSD.ORG Wed May 23 23:48:42 2007 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 013FC16A46B for ; Wed, 23 May 2007 23:48:42 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.186]) by mx1.freebsd.org (Postfix) with ESMTP id E363213C46A for ; Wed, 23 May 2007 23:48:41 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (smtpin08-en2 [10.13.10.153]) by smtpout.mac.com (Xserve/smtpout16/MantshX 4.0) with ESMTP id l4NNmZPl023159; Wed, 23 May 2007 16:48:35 -0700 (PDT) Received: from [172.24.104.227] (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mac.com (Xserve/smtpin08/MantshX 4.0) with ESMTP id l4NNmSMY015192 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 23 May 2007 16:48:30 -0700 (PDT) In-Reply-To: <20070523163109.X9443@10.0.0.1> References: <20070520155103.K632@10.0.0.1> <20070523155236.U9443@10.0.0.1> <6A9BD12D-D93C-4AE8-B4F4-D59A0327032D@mac.com> <20070523163109.X9443@10.0.0.1> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <38601004-BB95-4B8B-87A6-26E2D52B89BA@mac.com> Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Wed, 23 May 2007 16:48:25 -0700 To: Jeff Roberson X-Mailer: Apple Mail (2.752.3) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes Cc: arch@freebsd.org Subject: Re: sched_lock && thread_lock() X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2007 23:48:42 -0000 >> The old patch was missing PowerPC & ia64. Will the final version >> include those as well? > > There are a couple of uses of the global scheduler lock in some > architecture specific locations. They will continue to be safe > with the 4BSD scheduler. I intended to work on these issues with > the architecture maintainers after the threadlock patch goes in. > Can you suggest some alternative to sched_lock for pmap_switch in > ia64? pmap_switch() is called from cpu_switch() and from pmap_install(). So, currently, pmap_install() grabs sched_lock to mimic the cpu_switch() path and we assert having sched_lock in pmap_switch(). Basically, any lock that serializes cpu_switch() would work, because we don't want to switch the thread while in the middle of setting up the region registers. > There are a couple of these small issues that should be perfectly > safe that I was hoping to address outside of this patch so that it > didn't get too big. I noticed you introduced sched_throw(). Would it harm if ia64 doesn't yet use sched_throw() and instead has the sequence it replaces? In other words: is the initial implementation of sched_throw() the same as the current code? -- Marcel Moolenaar xcllnt@mac.com