From owner-cvs-all@FreeBSD.ORG Fri May 21 14:04:12 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C95F16A4D0 for ; Fri, 21 May 2004 14:04:12 -0700 (PDT) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 8A0FA43D31 for ; Fri, 21 May 2004 14:04:11 -0700 (PDT) (envelope-from tmoestl@gmx.net) Received: (qmail 9200 invoked by uid 65534); 21 May 2004 21:04:06 -0000 Received: from p50907AD5.dip.t-dialin.net (EHLO timesink.dyndns.org) (80.144.122.213) by mail.gmx.net (mp013) with SMTP; 21 May 2004 23:04:06 +0200 X-Authenticated: #5374206 Received: by abel (Postfix, from userid 1001) id E55246D1; Fri, 21 May 2004 23:04:14 +0200 (CEST) Date: Fri, 21 May 2004 23:04:14 +0200 From: Thomas Moestl To: John Baldwin Message-ID: <20040521210408.GA1109@timesink.dyndns.org> References: <200405211007.06100.jhb@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200405211007.06100.jhb@FreeBSD.org> User-Agent: Mutt/1.5.6i cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: Julian Elischer cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sparc64/sparc64 vm_machdep.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 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: Fri, 21 May 2004 21:04:12 -0000 On Fri, 2004/05/21 at 10:07:06 -0400, John Baldwin wrote: > On Thursday 20 May 2004 04:04 pm, Julian Elischer wrote: > > On Thu, 20 May 2004, Thomas Moestl wrote: > > > On Thu, 2004/05/20 at 11:48:19 -0700, Julian Elischer wrote: > > > > While you are there, can you rename it to cpu_exit2() > > > > as it has nothing to do with the scheduler.. > > > > > > As I mentioned previously, the connection is that this function must > > > be called with sched_lock held (and it must be held until the final > > > cpu_throw() after that). It does tasks that have a connection to > > > thread switching, so the name is not really inappropriate. > > > > > > cpu_exit2 is far less descriptive as a name. > > > > but less misleading than cpu_sched_sxit() > > > > switching is nothing to do with the scheduler.. > > Uh, switching between threads is all the scheduler does. cpu_exit2() is a > horrible name. One question for Thomas, can the sparc64 cpu_switch() and/or > cpu_throw() just call this function directly to avoid having exit1 > ()/thread_exit()/whoever know about it? That would be impractical, because with the current code, there is a small race window that would require to move the cpu_sched_exit() call before setting the process state to PRS_ZOMB. Moving the code to cpu_throw() would make this completely impossible. However, I am currently testing a patch that moves that work to pmap_release(), which IMHO also makes the code a bit cleaner. That would allow us to remove that callback, and fix the race at the same time. - Thomas -- Thomas Moestl http://www.tu-bs.de/~y0015675/ http://people.FreeBSD.org/~tmm/ "I was going to be a neo-deconstructivist but Mom wouldn't let me." -- Calvin and Hobbes