Skip to content
  • Colin Cross's avatar
    freezer: add new freezable helpers using freezer_do_not_count() · dd5ec0f4
    Colin Cross authored
    
    
    Freezing tasks will wake up almost every userspace task from
    where it is blocking and force it to run until it hits a
    call to try_to_sleep(), generally on the exit path from the syscall
    it is blocking in.  On resume each task will run again, usually
    restarting the syscall and running until it hits the same
    blocking call as it was originally blocked in.
    
    To allow tasks to avoid running on every suspend/resume cycle,
    this patch adds additional freezable wrappers around blocking calls
    that call freezer_do_not_count().  Combined with the previous patch,
    these tasks will not run during suspend or resume unless they wake
    up for another reason, in which case they will run until they hit
    the try_to_freeze() in freezer_count(), and then continue processing
    the wakeup after tasks are thawed.
    
    Additional patches will convert the most common locations that
    userspace blocks in to use freezable helpers.
    
    Acked-by: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarColin Cross <ccross@android.com>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    dd5ec0f4