From owner-cvs-all@FreeBSD.ORG Sat Mar 5 23:55:10 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 444E516A4CE; Sat, 5 Mar 2005 23:55:10 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2784643D46; Sat, 5 Mar 2005 23:55:10 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from [127.0.0.1] (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j25Nt8LL049139; Sat, 5 Mar 2005 23:55:09 GMT (envelope-from davidxu@freebsd.org) Message-ID: <422A46E3.6070902@freebsd.org> Date: Sun, 06 Mar 2005 07:55:15 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.7.2) Gecko/20041004 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mike Silbersack References: <200503050915.j259F30c058488@repoman.freebsd.org> <20050305041220.M4921@odysseus.silby.com> In-Reply-To: <20050305041220.M4921@odysseus.silby.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/sys proc.h umtx.h src/sys/kernkern_thread.c kern_umtx.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: Sat, 05 Mar 2005 23:55:10 -0000 Mike Silbersack wrote: > > On Sat, 5 Mar 2005, David Xu wrote: > >> davidxu 2005-03-05 09:15:03 UTC >> >> FreeBSD src repository >> >> Modified files: >> sys/sys proc.h umtx.h >> sys/kern kern_thread.c kern_umtx.c >> Log: >> Allocate umtx_q from heap instead of stack, this avoids >> page fault panic in kernel under heavy swapping. > > > Heavy swapping, or just unlucky swapping like we were talking about in > relation to kern_sig.c? > If I understand it correctly, kernel stack is swapped out only when there is memory pressure, for example, following code: char *p = malloc(1024 * 1024 * 512); // assume you have memory less than 512M for (;;) memset(p, 0, 1024 * 1024 * 512); and if there is thousands of thread in the kernel and all are sleeping (rarely extreme case), swapping out all their kernel stack can save several megabytes. because so many people have the objection to disable it, and would like to accept a serious risk, I just adjusted the code to work around it, that does not mean I agree their points. > Mike "Silby" Silbersack > >