std.parallelism: Request for Review [Summary of discussion]

Russel Winder russel at russel.org.uk
Tue Mar 1 12:34:39 PST 2011


On Tue, 2011-03-01 at 13:06 -0500, jasonw wrote:
> dsimcha Wrote:
> 
> > Ok, so that's one issue to cross off the list.  To summarize the discussion so
> > far, most of it's revolved around the issue of automatically determining how many
> > CPUs are available and therefore how many threads the default pool should have.
> > Previously, std.parallelism had been using core.cpuid for this task.  This module
> > doesn't work yet on 64 bits and doesn't and isn't supposed to determine how many
> > sockets/physical CPUs are available.  This was a point of miscommunication.
> > 
> > std.parallelism now uses OS-specific APIs to determine the total number of cores
> > available across all physical CPUs.  This appears to Just Work (TM) on 32-bit
> > Windows, 32- and 64-bit Linux, and 32-bit Mac OS.
> 
> Does a Hyperthread machine have 2x as much cores & worker threads ? In Pentium 4 HT might reduce throughput, in Core i7 increase it.

There appear to be Core i7s and other Core i7s.  Some of them may
actually be quad core, but some of them are dual core with 2
hyperthreads per core.  To Java these dual-core-twin-hyperthread
processors actually behave like 4 processors, to C, C++, etc. they look
just like any other dual core processor.  Sadly they announce themselves
to Linux as 4 processors, which is clearly a lie.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at russel.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110301/547a5d20/attachment.pgp>


More information about the Digitalmars-d mailing list