title: Linux find out Hyper-threaded core id
body: <p>I spent this morning trying to find out how to determine which processor id is the hyper-threaded core, but without luck. </p>
  
  <p>I wish to find out this information and use <code>set_affinity()</code> to bind a process to hyper-threaded thread or non-hyper-threaded thread to profile its performance.</p>