Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 May 2004 12:57:53 -0400 (EDT)
From:      Daniel Eischen <eischen@vigrid.com>
To:        Alexandre Sunny Kovalenko <Alex.Kovalenko@verizon.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Is it possible to make -lpthread program to use 100% CPU?
Message-ID:  <Pine.GSO.4.10.10405021253050.4766-100000@pcnet5.pcnet.com>
In-Reply-To: <20040502105310.365f91e3.Alex.Kovalenko@verizon.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2 May 2004, Alexandre Sunny Kovalenko wrote:
> 
> I did mention this one ;) With older sources (kern_thread.c 1.175) I have tried
> both with the similar results. With the last update (last CTM from EST morning
> on Friday 4/30) I only tried _ULE. If you need me to try _4BSD, let me know.
> 
> Just out of curiosity, if I have 64 threads and 4 CPUs would not result be the
> same with PTHREAD_SCOPE_SYSTEM and PTHREAD_SCOPE_PROCESS, since I could not
> get more KSEGs then I have CPUs, and default is 8 threads per KSEG? Or am I
> totally off the mark?

You can have more KSEGs than CPUs.  The default is one KSEG
with N KSEs (where N is the number of CPUs).  All scope
process threads run in the N KSEs; these threads are not
bound to any specific KSE within the KSEG.

Scope system threads get their own KSEG and KSE.

I don't know how the various schedulers schedule KSEs
onto processors.

-- 
Dan Eischen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10405021253050.4766-100000>