mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Igor Chudov <ichudov@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Hyperthreading on 4 core CPU DECREASES performance???
Date: Wed, 28 Oct 2009 22:24:39 +0000	[thread overview]
Message-ID: <20091028222439.3e0be650@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <e86b7d350910281224i7e91a1ecp9f3d15d9c36f19cb@mail.gmail.com>

> This is Ubuntu Hardy, 2.6.24 kernel. I tried the same with 2.6.31,
> with the same effect.
> 
> This article from Intel:
> 
> http://software.intel.com/sites/oss/pdfs/mclinux.pdf
> 
> It talks about intelligent handling of multiple cores as a done deal,
> but in my experience that did not actually occur.
> 
> I would like to know how can I make the scheduler to prefer to spread
> the tasks across physical cores as opposed to bundling two on one core
> and leaving some cores idle.

The scheduler will try and do balancing for packages and for HT. Make
sure your distribution is built with the SCHED_SMT and SCHED_MC options
enabled. Some of the non-enterprise distirbutions may well not have these
enabled.

For hand laying out threads see: man pthread_setaffinity_np

The win from HT depends a lot on the CPU and also the workload mix. In
some workloads it will decrease performance.




  parent reply	other threads:[~2009-10-28 22:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-28 19:24 Igor Chudov
2009-10-28 20:46 ` Andreas Mohr
2009-10-28 21:11   ` Igor Chudov
2009-10-28 22:24 ` Alan Cox [this message]
2009-10-29  0:00   ` Igor Chudov
2009-10-29  0:44     ` Ben Gamari

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=20091028222439.3e0be650@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=ichudov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®