9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: David Presotto <presotto@closedmind.org>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] hyperthreading
Date: Mon,  5 Jan 2004 09:31:55 -0500	[thread overview]
Message-ID: <a26298321f040d8e8fdffd7c15f25529@plan9.bell-labs.com> (raw)
In-Reply-To: <bsn6bb$e4nr9$1@ID-216690.news.uni-berlin.de>

hyperthreading is another step down using as much of your resources as
possible.

With single threaded RISCs, we used instruction scheduling
to try to saturate the memory bus while computing.  This was pretty
straightforward and just required a good compiler backend.  Unfortnately,
it didn't work that well.  With only one thread, it was hard to always
find some memory accesses to do even with speculative execution.  You
could switch threads but that was expensive since you had to back out
much of the state of the current thread.

CISCs did pretty much the same thing with multiissue machines
and with Very Wide instructions.  Get enough stuff to do into the machine
so that at any one time the cpu elements and the memory bus were being
used at the greatest efficiency.

Hyperthreading is just another step down that path.  If you are executing
multiple threads simultaneously, there's some hope that you can find something
to use the memory bus for or utilize pipeline elements for while executing
the instructions.  It isn't so much an attempt to reduce context switch time
as it is an attempt to keep more options available to the processor's
internal scheduling.

Even with that, you're fighting a battle between using the chip area for
a truly hyperhtreaded processor and just sticking a separate processor core
on the chip.  Each thread increases the amount of synchronization (and
thus stalling) in the pipelines.  However, each extra thread uses up less
chip space than another core.  The point you give up and add another
processor (and syncronized write buffer) depends on the complexity
of the processor itself.  You're not likely to go to many threads
with an x86 and have it still look like an x86.  I believe
someone already pointed out that there really isn't that much
parallelism in the current hyperthreaded x86's.

In short, hyperthreading isn't a replacement for multiprocessors.  Its
just a way to build a single processor with greater (in some cases)
aggregate performance for the same (or not much greater) price.


  reply	other threads:[~2004-01-05 14:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-26 23:05 andrey mirtchovski
2003-12-27  0:00 ` jmk
2003-12-27 18:39   ` jmk
2003-12-28 16:11   ` ron minnich
2003-12-28 22:12     ` Joel Salomon
2003-12-29  1:47       ` William Josephson
2003-12-31 17:08       ` ron minnich
2004-01-05 11:03     ` Vasile Rotaru
2004-01-05 14:31       ` David Presotto [this message]
2004-01-05 15:32         ` ron minnich
2003-12-27  4:10 ` [9fans] fossil/venti vdharani
2003-12-27  4:49   ` okamoto
2003-12-27  7:52     ` vdharani
2003-12-27  5:20       ` mirtchov
2003-12-28  4:47       ` okamoto
2003-12-28  8:22         ` vdharani
2003-12-28  6:40           ` andrey mirtchovski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a26298321f040d8e8fdffd7c15f25529@plan9.bell-labs.com \
    --to=presotto@closedmind.org \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).