• Johannes Berg's avatar
    um: time-travel: Actually apply "free-until" optimisation · 452f94ce
    Johannes Berg authored
    Due a bug - we never checked the time_travel_ext_free_until value - we
    were always requesting time for every single scheduling. This adds up
    since we make reading time cost 256ns, and it's a fairly common call.
    Fix this.
    
    While at it, also make reading time only cost something when we're not
    currently waiting for our scheduling turn - otherwise things get mixed
    up in a very confusing way. We should never get here, since we're not
    actually running, but it's possible if you stick printk() or such into
    the virtio code that must handle the external interrupts.
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
    452f94ce
time.c 21.2 KB