From owner-cvs-all@FreeBSD.ORG Mon Mar 21 22:27:27 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 0688516A534; Mon, 21 Mar 2005 22:27:27 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8DCFF43D3F; Mon, 21 Mar 2005 22:27:26 +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 08CF57A403; Mon, 21 Mar 2005 14:27:26 -0800 (PST) Message-ID: <423F4A4D.1040708@elischer.org> Date: Mon, 21 Mar 2005 14:27:25 -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 Xu References: <200503190822.j2J8MEcp087236@repoman.freebsd.org> <423C0A0F.6090409@freebsd.org> In-Reply-To: <423C0A0F.6090409@freebsd.org> 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: Poul-Henning Kamp cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_thread.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: Mon, 21 Mar 2005 22:27:27 -0000 this is a bad thing..... the previosu allocator was assuming that the TID would remain associated with the thread structure as it is moved in and out of the thread cache. This can occur up to twice in a single system call. Can we either have alloc_unr, or umw_fini fixed to allow this exepceted behaviour to continue, or have our old allocator back, which didn't require this extra restriction? Threads go in and out through the ctor() and dtor() possibly several orders of magniture more than they go through the ini() and fini() routines. (depending on usage) The original code was vary carefully put where it was for this reason. David Xu wrote: > Poul-Henning Kamp wrote: > >> phk 2005-03-19 08:22:13 UTC >> >> FreeBSD src repository >> >> Modified files: >> sys/kern kern_thread.c Log: >> Sleeping is not allowed in uma->fini >> >> Revision Changes Path >> 1.213 +4 -4 src/sys/kern/kern_thread.c >> >> >> >> > I have not tested if this change will hurt libpthread performance, > but it is obvious that benifit of uma cache will be reduced by > this change. > > David Xu