title: Why coroutine doesn't involve kernel mode
body: <p>When we say &quot;context switch&quot;, generally it means switching between execution unit (<code>struct task_struct</code> in linux), which involves (from what I know):</p>
  <ol>
  <li><p>store and load of registers value</p>
  </li>
  <li><p>TLB shootdown, if two execution units are not of the same process</p>
  </li>
  <li><p>loading for page table</p>
  </li>
  <li><p>user mode to kernel mode switch</p>
  </li>
  </ol>
  <p>I often see words like &quot;coroutine switch doesn't involve mode switch&quot;, but I think coroutine switch also involves register switch, why it doesn't need kernel mode?</p>