LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Tim Prince (tprince_at_[hidden])
Date: 2005-03-11 08:54:44


At 01:02 AM 3/11/2005, Andras Szabo wrote:

>As far as I know there are system calls that can set CPU affinity in the
>Linux kernel series 2.6.x (to be exact it first appeared in 2.5.x, and maybe
>it was ported back to 2.4.x series).
>
>The system call is sys_sched_setaffinity(), where you can set masks which
>describes how a given pid can be scheduled (to which processors can be
>assigned). This call isn't portable to different unices, and I have no
>further knowledge how other vendors get rid of this task.
>
>On the other hand I think that hyperthreading is not a good option for HPC,
>especially for floating point related applications and benchmarks like HPL.
>It was discussed here before, that it has the potential to make some cache
>trashing which degrades HPL performance.

Among the publicized goals of the improvements in 2.6 kernels is to enable
effective scheduling on MP HyperThreading, without requiring
setaffinity(). I don't see any need for setting affinity on single CPU
nodes. The pros and cons of HyperThreading are numerous. With current
larger cache models, cache capacity should have moved into the pro
category, for most applications. You will find articles posted on Write
Combine Buffering; note that the latest models from both vendors have more
Write Combine Buffers than at the time the articles were
written. Clearly, applications which are billed out by number of
processes will not benefit from HyperThreading. I assume that there are
enough outfits which bill by number of nodes that I will find it worth
while to revisit these questions. In the past, you are correct, the best
strategy for dual processor nodes has generally been to disable
HyperThreading, and will remain so in the absence of kernel and hardware
upgrades.

Tim Prince