From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Joel Schopp <jschopp@austin.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org,
Nathan Lynch <nathanl@austin.ibm.com>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [patch 2/4] s390: fix preempt_count of idle thread with cpu hotplug
Date: Fri, 17 Feb 2006 08:26:51 +0100 [thread overview]
Message-ID: <20060217072651.GA9230@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <43F4BFFC.8050604@austin.ibm.com>
> >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
prev parent reply other threads:[~2006-02-17 7:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-16 7:18 [patch 2/4] s390: fix preempt_count of idle thread with cpu hotplug Heiko Carstens
2006-02-16 18:10 ` Joel Schopp
2006-02-17 7:26 ` Heiko Carstens [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060217072651.GA9230@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=akpm@osdl.org \
--cc=jschopp@austin.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nathanl@austin.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.