Messages in this thread | | | Date | Fri, 17 Feb 2006 08:26:51 +0100 | From | Heiko Carstens <> | Subject | Re: [patch 2/4] s390: fix preempt_count of idle thread with cpu hotplug |
| |
> >Set preempt_count of idle_thread to zero before switching off cpu. > >Otherwise the preempt_count will be wrong if the cpu is switched on again > >since the thread will be reused. > > I had a similar discussion back in November, that one about > /proc/interrupts stats. Rather than do that all over again below is a cut > and paste of my reply to that discussion. The executive summary is I > rather like the current behavior as is. > > ------------------------------------------------------------- > > > When CPU2 is off-lined, the statistics for CPU2 do not appear > >(expected). However when you look at the before picture (all CPUs > >present) and after picture (all cpus present after CPU2 re-added), you > >see that the original data was returned and has incremented:
Think we're talking about different things. preempt_count is not statistical stuff. Actually if you have preempt_count != 0 preemption is disabled. At least on s390 we didn't set this counter to 0 in case of cpu hotplug thus ending with a preempt_count > 0 if a cpu gets reenabled. Which gives us a lot of warnings ala "scheduling while atomic: swapper/0x00000001/0". So this is not a restriction that should be documented somewhere but a bug.
No idea how powerpc deals with this and if there is the same issue. Just tried to give a hint since cpu hotplug code for powerpc and s390 looks quite the same.
Heiko - 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/
| |