From owner-cvs-src@FreeBSD.ORG  Sun Mar 20 01:17:59 2005
Return-Path: <owner-cvs-src@FreeBSD.ORG>
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 CB15916A4E3; Sun, 20 Mar 2005 01:17:59 +0000 (GMT)
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id AB73643D5D; Sun, 20 Mar 2005 01:17:59 +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.3/8.13.3) with ESMTP id j2K1Hri2067627;
	Sun, 20 Mar 2005 01:17:57 GMT
	(envelope-from davidxu@freebsd.org)
Message-ID: <423CCF49.4060106@freebsd.org>
Date: Sun, 20 Mar 2005 09:18:01 +0800
From: David Xu <davidxu@freebsd.org>
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: Scott Long <scottl@samsco.org>
References: <23463.1111232399@critter.freebsd.dk>
	<423C418D.4080104@samsco.org>
In-Reply-To: <423C418D.4080104@samsco.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
cc: cvs-src@freebsd.org
cc: Poul-Henning Kamp <phk@phk.freebsd.dk>
cc: src-committers@freebsd.org
cc: cvs-all@freebsd.org
Subject: Re: cvs commit: src/sys/kern kern_thread.c
X-BeenThere: cvs-src@freebsd.org
X-Mailman-Version: 2.1.1
Precedence: list
List-Id: CVS commit messages for the src tree <cvs-src.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/cvs-src>,
	<mailto:cvs-src-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/cvs-src>
List-Post: <mailto:cvs-src@freebsd.org>
List-Help: <mailto:cvs-src-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/cvs-src>,
	<mailto:cvs-src-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 20 Mar 2005 01:18:00 -0000

Scott Long wrote:

> Poul-Henning Kamp wrote:
>
>> In message <423C0A0F.6090409@freebsd.org>, David Xu writes:
>>
>>> Poul-Henning Kamp wrote:
>>>
>>>
>>>> phk         2005-03-19 08:22:13 UTC
>>>>
>>>> FreeBSD src repository
>>>>
>>>> Sleeping is not allowed in uma->fini
>>>>
>>>
>>> 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.
>>
>>
>>
>> I am aware of that and I don't like it either.
>>
>> The problem is that the uma_mutex is held over the uma->fini() call
>> and I'm surprised that we set so tight constraints on these functions
>> but I did not manage to corner the UMA crew and talk to them about it
>> yesterday evening.
>>
>> One obvious solution is to taskq the release of the unit number.
>>
>
> Since unit number release isn't a time-critical operation (right?), it
> sounds like a perfect candidate for a taskqueue.
>
> Scott
>
>
Thread creation should be fast. I like the unit allocator because it can
save duplicated code, but if things become complex, we should restore
orignal code which is straight forward.

David Xu