Skip to content
  • chai wen's avatar
    softlockup: make detector be aware of task switch of processes hogging cpu · b1a8de1f
    chai wen authored
    
    
    For now, soft lockup detector warns once for each case of process
    softlockup.  But the thread 'watchdog/n' may not always get the cpu at the
    time slot between the task switch of two processes hogging that cpu to
    reset soft_watchdog_warn.
    
    An example would be two processes hogging the cpu.  Process A causes the
    softlockup warning and is killed manually by a user.  Process B
    immediately becomes the new process hogging the cpu preventing the
    softlockup code from resetting the soft_watchdog_warn variable.
    
    This case is a false negative of "warn only once for a process", as there
    may be a different process that is going to hog the cpu.  Resolve this by
    saving/checking the task pointer of the hogging process and use that to
    reset soft_watchdog_warn too.
    
    [dzickus@redhat.com: update comment]
    Signed-off-by: default avatarchai wen <chaiw.fnst@cn.fujitsu.com>
    Signed-off-by: default avatarDon Zickus <dzickus@redhat.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    b1a8de1f