Skip to contentSkip to conversation

Add MCE resume under ia32

PATCH Andi Kleen 3 participants 9 messages Aug 24, 2005 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 1124762500.3013.3.camel@linux-hp.sh.intel.com.suse.lists.linux.kernel

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 1124846001.3007.7.camel@linux-hp.sh.intel.com.suse.lists.linux.kernel

Andi Kleen

author
#3 lore raw
Quoted 2 lines · Shaohua Li

x86-64 has resume support. It uses 'on_each_cpu' in resume method, which is known broken. We'd better fix it.

What is broken with it?

-Andi

#4 lore raw
Quoted 6 lines · Andi Kleen
Quoted 2 lines · Shaohua Li

x86-64 has resume support. It uses 'on_each_cpu' in resume method, which is known broken. We'd better fix it.

What is broken with it?

It's a sysdev. The resume method is invoked with interrupt disabled.

Thanks,
Shaohua

author
#5 lore raw
Quoted 8 lines · Shaohua Li
Quoted 5 lines · Andi Kleen
Quoted 2 lines · Shaohua Li

x86-64 has resume support. It uses 'on_each_cpu' in resume method, which is known broken. We'd better fix it.

What is broken with it?

It's a sysdev. The resume method is invoked with interrupt disabled.

But only local interrupt disabled, no?

Hmm - didn't we have a WARN_ON(irqs_disabled()) in smp_call_function().

Anyways, it'll probably still work for now because the system should be synchronized at this point.

-Andi

#6 lore raw
Quoted 8 lines · Andi Kleen
Quoted 7 lines · Shaohua Li
Quoted 5 lines · Andi Kleen
Quoted 2 lines · Shaohua Li

x86-64 has resume support. It uses 'on_each_cpu' in resume method, which is known broken. We'd better fix it.

What is broken with it?

Quoted 8 lines
Quoted 1 line

It's a sysdev. The resume method is invoked with interrupt disabled.

But only local interrupt disabled, no?

Hmm - didn't we have a WARN_ON(irqs_disabled()) in smp_call_function().

Anyways, it'll probably still work for now because the system should be synchronized at this point.

We are using cpu hotplug framework for MP suspend/resume. When sysdev's resume is calling, APs actually aren't up. So it actually can't work.

Thanks,
Shaohua

author
#7 lore raw

[adding discuss to cc]

Quoted 13 lines · Shaohua Li
Quoted 12 lines · Andi Kleen
Quoted 8 lines · Shaohua Li
Quoted 5 lines · Andi Kleen
Quoted 2 lines · Shaohua Li

x86-64 has resume support. It uses 'on_each_cpu' in resume method, which is known broken. We'd better fix it.

What is broken with it?

It's a sysdev. The resume method is invoked with interrupt disabled.

But only local interrupt disabled, no?

Quoted 7 lines
Quoted 4 lines

Hmm - didn't we have a WARN_ON(irqs_disabled()) in smp_call_function().

Anyways, it'll probably still work for now because the system should be synchronized at this point.

We are using cpu hotplug framework for MP suspend/resume. When sysdev's resume is calling, APs actually aren't up. So it actually can't work.

Ok, that's a new problem.

There were recently some patches to add individual MCE entries for each CPU to sysfs. They are only used for set up right now, but perhaps they can be linked somehow to the cpu sysfs devices and get suspend/resume events from there.

-Andi

#8 lore raw
Quoted 24 lines · Andi Kleen

[adding discuss to cc]

Quoted 13 lines · Shaohua Li
Quoted 12 lines · Andi Kleen
Quoted 8 lines · Shaohua Li
Quoted 5 lines · Andi Kleen
Quoted 2 lines · Shaohua Li

x86-64 has resume support. It uses 'on_each_cpu' in resume method, which is known broken. We'd better fix it.

What is broken with it?

It's a sysdev. The resume method is invoked with interrupt disabled.

But only local interrupt disabled, no?

Quoted 7 lines
Quoted 4 lines

Hmm - didn't we have a WARN_ON(irqs_disabled()) in smp_call_function().

Anyways, it'll probably still work for now because the system should be synchronized at this point.

We are using cpu hotplug framework for MP suspend/resume. When sysdev's resume is calling, APs actually aren't up. So it actually can't work.

Quoted 6 lines

Ok, that's a new problem.

There were recently some patches to add individual MCE entries for each CPU to sysfs. They are only used for set up right now, but perhaps they can be linked somehow to the cpu sysfs devices and get suspend/resume events from there.

The boot code already initialized MCE for APs, it isn't required to initialize again. The MCE entries are cpuhotplug friendly, so for suspend/resume.

Thanks,
Shaohua

author
#9 lore raw
Quoted 3 lines · Shaohua Li

The boot code already initialized MCE for APs, it isn't required to initialize again. The MCE entries are cpuhotplug friendly, so for suspend/resume.

Ok so you're saying the only change needed is to remove the on_each_cpu() in the resume method? Fine I can do that.

-Andi

#10 lore raw
Quoted 8 lines · Andi Kleen
Quoted 3 lines · Shaohua Li

The boot code already initialized MCE for APs, it isn't required to initialize again. The MCE entries are cpuhotplug friendly, so for suspend/resume.

Ok so you're saying the only change needed is to remove the on_each_cpu() in the resume method? Fine I can do that.

Yep, only BP needs it. But I'm not sure if we should do the same (add the sysdev class) in ia32, considering only BP needs it.

Thanks,
Shaohua

#11 lore raw

Hi!

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

The boot code already initialized MCE for APs, it isn't required to initialize again. The MCE entries are cpuhotplug friendly, so for suspend/resume.

Ok so you're saying the only change needed is to remove the on_each_cpu() in the resume method? Fine I can do that.

Yep, only BP needs it. But I'm not sure if we should do the same (add the sysdev class) in ia32, considering only BP needs it.

Adding sysdev class is nicer than #ifdef in the code, I'd say.

Pavel

Signature · 1 line
if you have sharp zaurus hardware you don't need... you know my address