[PATCH][RFC] preempt_count corruption across H_CEDE call with CONFIG_PREEMPT on pseries

Thomas Gleixner tglx at linutronix.de
Fri Jul 23 04:38:35 EST 2010

On Thu, 22 Jul 2010, Darren Hart wrote:
> Also of interest is that this path
> cpu_idle()->cpu_die()->pseries_mach_cpu_die() to start_secondary()
> enters with a preempt_count=1 if it wasn't corrupted across the hcall.

That triggers the problem as well. preempt_count needs to be 0 when
entering start_secondary(). So I really wonder how that ever worked.

> The early boot path from _start however appears to call
> start_secondary() with a preempt_count of 0.

Which is correct.
> The following patch is most certainly not correct, but it does eliminate

It is correct, but i think it is incomplete as other portions of the
thread_info on the stack might be in some weird state as well.

> the situation on mainline 100% of the time (there is still a 25%
> reproduction rate on PREEMPT_RT).

But those are diffferent issues, for which we have reasonable
explanations and patches/workarounds.

> 2) Should we call preempt_enable() in cpu_idle() prior to cpu_die() ?



More information about the Linuxppc-dev mailing list