From owner-cvs-all@FreeBSD.ORG Thu Mar 3 14:08:39 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 83F6E16A4CE; Thu, 3 Mar 2005 14:08:39 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE03A43D1D; Thu, 3 Mar 2005 14:08:36 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior-wifi.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.1/8.13.1) with ESMTP id j23EAhSs004306; Thu, 3 Mar 2005 07:10:43 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <422719E0.10703@samsco.org> Date: Thu, 03 Mar 2005 07:06:24 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050218 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Xu References: <200503021343.j22DhpQ3075008@repoman.freebsd.org> <200503020915.28512.jhb@FreeBSD.org> <4226446B.7020406@freebsd.org> <61ac46c154aa515a692308440dd1141d@FreeBSD.org> <422710DD.1070203@freebsd.org> In-Reply-To: <422710DD.1070203@freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.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 14:08:39 -0000 David Xu wrote: > John Baldwin wrote: > >> >> Note that swapping out the stack is the default behavior in 4.x, so >> I actually think that the million lines of kernel code are indeed >> safe, only sigwait() is broken and should be fixed. :) >> > Many 4.x programming skill can not be applied to FreeBSD current, > they are so different, most of code in kern/ seems be completely > rewritten. :=) > > David Xu > I think you're making a much bigger deal out of this than it needs to be. Swapping the kernel stacks is important on real production systems. FreeBSD has always been much better at handling low-memory situations that most other OSes, and it's one of the things that has kept it relevant in the server area. A few 16K chunks might not seem like a lot on a desktop system, but when you're talking about a server with hundreds of ithreads and hundreds of user processes, it matters a quite a bit. Also, there is talk about increasing the default kstack size due to all of the extra inlining that the compiler does with the -O2 option and the large recursion problems in the softdep code. If we do this, then being able to swap them out gets even more important. It's not about convenience or taking the easy way out. Let's fix sigwait() to have the proper assumptions and go from there. I'm inclined to agree with John that the problem is not widespread or impossible to track down. Fixing it is not hard either, we already have the PHOLD()/PRELE() functions for doing exactly what is needed here. Scott