Detangle lwkt_switch() and the idle thread and consolidate sleep variables

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Sun Sep 2 06:07:52 PDT 2007


Matthew Dillon wrote:
    I dont know the semantics of MONITOR/MWAIT.  What happens if you issue
    a MONITOR and the cpu takes an interrupt and issues another MONITOR/MWAIT
    before returning to your MWAIT?  That will govern whether/how we use the
    feature because it will determine whether we need to disable interrupts
    while doing the monitor/mwait sequence or not.
As Joerg already wrote, there are many conditions that will trigger the 
monitor.  Interrupts etc are one of these, so we can execute with 
interrupts enabled.  I was just curious how we could wait only on a 
single variable, even if we are waiting for multiple tokens and the mplock.

cheers
  simon





More information about the Kernel mailing list