Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 May 2004 20:41:57 -0400
From:      Alexandre "Sunny" Kovalenko <Alex.Kovalenko@verizon.net>
To:        freebsd-current@freebsd.org
Subject:   Re: Is it possible to make -lpthread program to use 100% CPU?
Message-ID:  <20040501204157.704fbc0d.Alex.Kovalenko@verizon.net>
In-Reply-To: <Pine.GSO.4.10.10405011448480.24869-100000@pcnet5.pcnet.com>
References:  <20040501122558.6139dec1.Alex.Kovalenko@verizon.net> <Pine.GSO.4.10.10405011448480.24869-100000@pcnet5.pcnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 1 May 2004 14:49:47 -0400 (EDT)
Daniel Eischen <eischen@vigrid.com> wrote:

> On Sat, 1 May 2004, Alexandre Sunny Kovalenko wrote:
> 
> > On Thu, 29 Apr 2004 17:16:21 +0200
> > Ivan Voras <ivoras@fer.hr> wrote:
> > 
> > > Alexandre Sunny Kovalenko wrote:
> > > 
> > > > Alternatively, if there is a need to test a patch or time a program 
> > > > in this environment, it could easily be accomplished -- it is a non-
> > > > production box.
> > > 
> > > Could you turn off Hyperthreading and report any changes?
> > > 
> > > 
> > > _______________________________________________
> > > freebsd-current@freebsd.org mailing list
> > > http://lists.freebsd.org/mailman/listinfo/freebsd-current
> > > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
> > 
> > I have updated my system to the latest CTM mailing on Friday (4/30) morning (EST).
> > This includes version 1.176 of kern_thread.c.
> > 
> > I have turned off hyperthreading and got result, which muddles me rather -- try
> > as I might, with -lpthread I could not get past 50% CPU utilization (as reported 
> > by 'top') and  number of computations per second matching that (number is very 
> > close to that  for running single-threaded). Top report with thread view enabled
> > shows that both KSE are bound to CPU 0 (if I am interpreting C column properly).
> 
> Are you using system or process scope threads?
> 
> -- 
> Dan Eischen
> 
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"

Sorry, should have mentioned that too. For -lthr PTHREAD_SCOPE_PROCESS is only 
available option. For -lpthread I have tried both, and results do not differ
much, which is what I expect on the machine that runs nothing else (unless
I do not understand PTHREAD_SCOPE_ option).

-- 
Alexandre "Sunny" Kovalenko.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040501204157.704fbc0d.Alex.Kovalenko>