lkml.org 
[lkml]   [2005]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: 2.6.11-rc3-mm1: softlockup and suspend/resume

    * Rafael J. Wysocki <rjw@sisk.pl> wrote:

    > It looks like softlockup is not happy with suspend/resume:

    Does it happen while writing out state to disk? I've attached a patch
    for touch_softlockup_watchdog() below - but i think what we really need
    is another mechanism. I'm wondering what the primary reason for the
    lockup-detection is - did swsuspend stop the the softlockup threads?

    Ingo

    --- linux/kernel/softlockup.c.orig
    +++ linux/kernel/softlockup.c
    @@ -20,6 +20,11 @@ static DEFINE_PER_CPU(unsigned long, tim
    static DEFINE_PER_CPU(unsigned long, print_timestamp) = 0;
    static DEFINE_PER_CPU(struct task_struct *, watchdog_task);

    +void touch_softlockup_watchdog(void)
    +{
    + per_cpu(timestamp, _smp_processor_id()) = jiffies;
    +}
    +
    /*
    * This callback runs from the timer interrupt, and checks
    * whether the watchdog thread has hung or not:
    @@ -66,7 +71,7 @@ static int watchdog(void * __bind_cpu)
    while (!kthread_should_stop()) {
    set_current_state(TASK_INTERRUPTIBLE);
    msleep_interruptible(HZ);
    - per_cpu(timestamp, this_cpu) = jiffies;
    + touch_softlockup_watchdog();
    }
    __set_current_state(TASK_RUNNING);

    --- linux/include/linux/sched.h.orig
    +++ linux/include/linux/sched.h
    @@ -179,6 +179,7 @@ extern unsigned long cache_decay_ticks;
    #ifdef CONFIG_DETECT_SOFTLOCKUP
    extern void softlockup_tick(struct pt_regs *regs);
    extern void spawn_softlockup_task(void);
    +extern void touch_softlockup_watchdog(void);
    #else
    static inline void softlockup_tick(struct pt_regs *regs)
    {
    @@ -186,6 +187,9 @@ static inline void softlockup_tick(struc
    static inline void spawn_softlockup_task(void)
    {
    }
    +static inline void touch_softlockup_watchdog(void)
    +{
    +}
    #endif


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2005-03-22 14:10    [W:0.037 / U:0.340 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site