I have a ultra-high-end, top-of-the-line Intel core i3 laptop and I am always surprised by my cpu utilization and affinities, especially when it comes to hyperthread utilization. I wonder if there is a way that I can prevent the system from moving around threads, especially if it moves them to HT cores.

For example, I am running a single core physics simulation I wrote and Thunderbird. I see both processes jump around aimlessly between processors. I see Thunderbird cycle through all cores 0,1,2,3 and likewise I see the physics simulation cycle through all cores. The average time spent on a core is about 2 seconds. Whats strange is that the system sometimes puts these processes onto the HT core with what appears to be little utilization of the physical core.

My physics simulation gets an about 10% performance boost when I manually set the CPU affinity (then it doesn't jump everywhere), which makes me wonder if there is something suboptimal with how my process affinities are being managed.

Is there some way for me to hint to kernel how to better manage my applications? For example only to use the HT when the system is under extreme stress.

Intel cpu boost mhz on a core if few cores are in use, so you may get your cpu boost from that on your application when not jumping on all cores.

I would look at CONFIG_PREEMPT* settings in the kernel to try to lower the core jumping effect you have (specially the CONFIG_PREEMPT_VOLUNTARY one if set).
Maybe review your scheduling model in use too.

I don't know if it's in the kernel yet, but I'm under the impression that there is work ongoing to "stick" things to one core, yet allow it to move if that could allow significant power reduction. (like shutting down one core, moving the work to other(s))_________________.sigs waste space and bandwidth

You can set CPU sets or even pin threads to specific cores. Mind you that HT is multithreading on the same core, even though it appears as two.

It seems that newer i3 processors [url=http://ark.intel.com/products/65693/Intel-Core-i3-3220-Processor-(3M-Cache-3_30-GHz)]also have HT[/url]._________________"I'm just very selective about the reality I choose to accept." -- Calvin