title: What is the overhead of a context-switch?
body: <p>Originally I believed the overhead to a context-switch was the TLB being flushed. However I just saw on wikipedia:</p>
  
  <p><a href="http://en.wikipedia.org/wiki/Translation_lookaside_buffer">http://en.wikipedia.org/wiki/Translation_lookaside_buffer</a></p>
  
  <blockquote>
    <p>In 2008, both Intel (Nehalem)[18] and AMD (SVM)[19] have introduced
    tags as part of the TLB entry and dedicated hardware that checks the
    tag during lookup. Even though these are not fully exploited, it is
    envisioned that in the future, these tags will identify the address
    space to which every TLB entry belongs. <strong>Thus a context switch will not
    result in the flushing of the TLB</strong> – but just changing the tag of the
    current address space to the tag of the address space of the new task.</p>
  </blockquote>
  
  <p>Does the above confirm for newer Intel CPUs the TLB doesn't get flushed on context switches?</p>
  
  <p>Does this mean there is no real overhead now in a context-switch?</p>
  
  <p>(I am trying to understand the performance penalty of a context-switch)</p>