Re: 2.6.30-git(16 and 17) system hangs after resume from suspend to disk, mce related?

From: Maciej Rutecki
Date: Mon Jun 22 2009 - 03:19:58 EST


2009/6/22 Hidetoshi Seto <seto.hidetoshi@xxxxxxxxxxxxxx>:
>
> I see. ÂAt least this warning will be cleared by following patch.
> ÂWARN_ON(smp_processor_id() != data);
>
> But I'm not sure whether this can cause system hangs or not.
>
> Thanks,
> H.Seto
>
> ===
>
> [PATCH] x86, mce: percpu mcheck_timer should be pinned
>

>
> If CONFIG_NO_HZ + CONFIG_SMP, timer added via add_timer() might
> be migrated on other cpu. ÂUse add_timer_on() instead.
>
> Reported-by: Maciej Rutecki <maciej.rutecki@xxxxxxxxx>
> Signed-off-by: Hidetoshi Seto <seto.hidetoshi@xxxxxxxxxxxxxx>
> CC: Andi Kleen <ak@xxxxxxxxxxxxxxx>
> ---
> Âarch/x86/kernel/cpu/mcheck/mce.c | Â Â4 ++--
> Â1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
> index 7da8fec..8e1794a 100644
> --- a/arch/x86/kernel/cpu/mcheck/mce.c
> +++ b/arch/x86/kernel/cpu/mcheck/mce.c
> @@ -1117,7 +1117,7 @@ static void mcheck_timer(unsigned long data)
> Â Â Â Â Â Â Â Â*n = min(*n*2, (int)round_jiffies_relative(check_interval*HZ));
>
> Â Â Â Ât->expires = jiffies + *n;
> - Â Â Â add_timer(t);
> + Â Â Â add_timer_on(t, smp_processor_id());
> Â}
>
> Âstatic void mce_do_trigger(struct work_struct *work)
> @@ -1321,7 +1321,7 @@ static void mce_init_timer(void)
> Â Â Â Â Â Â Â Âreturn;
> Â Â Â Âsetup_timer(t, mcheck_timer, smp_processor_id());
> Â Â Â Ât->expires = round_jiffies(jiffies + *n);
> - Â Â Â add_timer(t);
> + Â Â Â add_timer_on(t, smp_processor_id());
> Â}
>
> Â/*
> --
> 1.6.3
>

Patch remove warning.

Tested-by Maciej Rutecki <maciej.rutecki@xxxxxxxxx>

_But_ still system hangs after resume and during s2disk (while use
echo 0 > /sys/devices...)

--
Maciej Rutecki
http://www.maciek.unixy.pl
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/