Re: [PATCH] x86: Document the hotplug code is incompatible with x86 irq handling

Rafael J. Wysocki
2007-06-01T20:29:16Z

On Friday, 1 June 2007 21:48, Eric W. Biederman wrote:
> "Rafael J. Wysocki" <rjw@sisk.pl> writes:
> >> Cool.
> >>
> >> My patch does not change the functionality of the code just complains
> >> very loudly that it is broken.
> >>
> >> Further the code is broken at a design level. The code isn't
> >> problematic the code is impossible. The cpu hotplug code can not be
> >> fixed on x86 without a redesign of the generic cpu hotplug code.
> >>
> >> Suspend does not need to use cpu hotplug because it already gets in
> >> deep with the drivers, and can stop interrupts at the source. I know
> >> there was some talk about this doing this earlier, but I don't know if
> >> anything came of that discussion.
> >>
> >> Regardless if you care about this being a problem feel free to fix the
> >> relevant code so it attempts to do something that the hardware
> >> actually supports.
> >>
> >> But if the suspend needs this code for smp support it is also broken.
> >
> > Well, from the functionality point of view, it's not. We have no problems
> > with it, at least not that I know of.
>
> Luck, or enough other issues someone hasn't tracked their problems
> down to this. On the pure cpu hotplug path I just got a bug
> report about it not working: http://lkml.org/lkml/2007/5/31/419

[Apart from what I said in the other message:]

In the hibernation/suspend code paths we call the CPU hotplug quite late,
actually right before we turn off local IRQs on the only CPU that is not
offlined. I think that at this point the majority of interrupt sources should
have been turned off already.

Greetings,
Rafael

--
"Premature optimization is the root of all evil." - Donald Knuth