From owner-cvs-src@FreeBSD.ORG Thu Mar 3 20:22:02 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AD1A16A4CE; Thu, 3 Mar 2005 20:22:02 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26FD543D2F; Thu, 3 Mar 2005 20:22:02 +0000 (GMT) (envelope-from julian@elischer.org) Received: from [208.206.78.97] (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id EF4C37A403; Thu, 3 Mar 2005 12:22:01 -0800 (PST) Message-ID: <422771E9.6070405@elischer.org> Date: Thu, 03 Mar 2005 12:22:01 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050218 X-Accept-Language: en, hu MIME-Version: 1.0 To: David Schultz 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> In-Reply-To: <20050303052902.GA14011@VARK.MIT.EDU> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: cvs-all@FreeBSD.org cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: David Xu cc: John Baldwin Subject: Re: cvs commit: src/sys/kern kern_sig.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2005 20:22:02 -0000 David Schultz wrote: >On Thu, Mar 03, 2005, David Xu wrote: > > >> >>This only partly resolves the problem, if function A call B, B call C, >>C is unknown to A, >>and C does a msleep(), problem still lhappens. >>However, if there needs a flag, I would like PNOSWAP for msleep just >>like PCATCH >>does. >> >> > >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. > > > >>>The alternative, of course, is to just fix the code that assumes >>>that swapping doesn't exist. >>> >>> >>> >>First find all code written in such way, but it is not that easy. >> >> > >True. If we changed msleep() to disable swapping by default, then >we wouldn't have to worry about correctness problems related to >missing some. > > adding the flag to ENABLE swapping would be ABI compatible.