From owner-cvs-all@FreeBSD.ORG Thu Mar 3 06:04:32 2005 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 4F14516A4CE; Thu, 3 Mar 2005 06:04:32 +0000 (GMT) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id E29E543D49; Thu, 3 Mar 2005 06:04:31 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.13.3/8.13.1) with ESMTP id j2363v8u014227; Thu, 3 Mar 2005 01:03:57 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.13.3/8.13.1/Submit) id j2363vvO014226; Thu, 3 Mar 2005 01:03:57 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Thu, 3 Mar 2005 01:03:57 -0500 From: David Schultz To: David Xu Message-ID: <20050303060357.GA14180@VARK.MIT.EDU> Mail-Followup-To: David Xu , John Baldwin , src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG References: <200503021343.j22DhpQ3075008@repoman.freebsd.org> <200503020915.28512.jhb@FreeBSD.org> <4226446B.7020406@freebsd.org> <20050303033115.GA13174@VARK.MIT.EDU> <42269DB0.6070107@freebsd.org> <20050303052902.GA14011@VARK.MIT.EDU> <4226A46B.2090704@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4226A46B.2090704@freebsd.org> cc: cvs-src@FreeBSD.ORG cc: src-committers@FreeBSD.ORG cc: cvs-all@FreeBSD.ORG cc: John Baldwin Subject: Re: cvs commit: src/sys/kern kern_sig.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: Thu, 03 Mar 2005 06:04:32 -0000 On Thu, Mar 03, 2005, David Xu wrote: > David Schultz wrote: > > >You have to worry about that anyway, though. A and B need to know > >that they're not allowed to hold locks across the calls if C calls > >msleep(), for instance. Anyway, your proposal if having a flag > >for msleep() is basically the same as my proposal of having a > >separate function. (The only difference is that adding a separate > >function doesn't break the ABI.) So it sounds like we're more or > >less in agreement here. > > > This is not a lock problem, this is the problem why a stack variable can not > be used when thread is going to sleep, this is a rather odd behavior to me. [...] True, but my point is that there are *already* a bunch of rules that have to be followed, so this is just one more. All of the rules that restrict what you can and can't call are bad for modularity, and I agree that this one is particularly obnoxious. Once again, that's why I suggested that the default be to have msleep() disable swapping. Then it could be selectively enabled in a few places like the I/O path. Of course, there's another possible solution which is to remove the swapping code entirely. That would certainly simplify things, but it would also make FreeBSD degrade less gracefully under load.