From owner-cvs-all@FreeBSD.ORG Sun Jul 3 01:23:48 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.ORG 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 2FDED16AAAF; Sun, 3 Jul 2005 01:01:05 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7065442F7; Sun, 3 Jul 2005 00:49:17 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 18F776E86A; Sat, 2 Jul 2005 17:40:16 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 8ACEB5C9D6 for ; Wed, 2 Mar 2005 22:04:44 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 887BD56BF4 for ; Thu, 3 Mar 2005 06:04:39 +0000 (GMT) (envelope-from owner-src-committers@FreeBSD.org) Received: by hub.freebsd.org (Postfix) id 06E1B16A52F; Thu, 3 Mar 2005 06:04:36 +0000 (GMT) Delivered-To: ps@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 538) id 6B89C16A4D0; Thu, 3 Mar 2005 06:04:33 +0000 (GMT) Delivered-To: src-committers@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) 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> Sender: owner-src-committers@FreeBSD.org Precedence: bulk X-Loop: FreeBSD.ORG X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00, SARE_SUB_GAPPY_3 autolearn=no version=3.0.2 X-Spam-Level: Cc: cvs-src@FreeBSD.ORG, src-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, John Baldwin Subject: Re: cvs commit: src/sys/kern kern_sig.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:23:49 -0000 X-Original-Date: Thu, 3 Mar 2005 01:03:57 -0500 X-List-Received-Date: Sun, 03 Jul 2005 01:23:49 -0000 X-List-Received-Date: Sun, 03 Jul 2005 01:23:49 -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.