From: Srivatsa Vaddagiri <vatsa@in.ibm.com>
To: Nishanth Aravamudan <nacc@us.ibm.com>,
Con Kolivas <kernel@kolivas.org>,
linux-kernel@vger.kernel.org, akpm@osdl.org,
ck list <ck@vds.kolivas.org>,
rmk+lkml@arm.linux.org.uk
Subject: Re: [PATCH 1/3] dynticks - implement no idle hz for x86
Date: Mon, 5 Sep 2005 11:02:25 +0530 [thread overview]
Message-ID: <20050905053225.GA4294@in.ibm.com> (raw)
In-Reply-To: <20050904212616.B11265@flint.arm.linux.org.uk>
On Sun, Sep 04, 2005 at 09:26:16PM +0100, Russell King wrote:
> I'd be really surprised if any architecture couldn't use what ARM has
> today - in other words, this is the only kernel-side interface:
Russel,
I went thr' the ARM implementation and have some remarks (mostly
from a SMP perspective):
1. On a SMP platform, we want to let individual CPUs "sleep" independent of
each other. What this mean is there has to be some way of tracking which
CPU's are sleeping currently, so that code like RCU ignores sleeping CPUs.
This was the reason nohz_cpu_mask bitmap was added. I don't see that
bitmap being updated at all in ARM implementation.
2. On architectures like x86 there is a separate jiffy interrupt source
(PIT) which is used to update time-of-day. This is different from the
HZ timer interrupts used on each CPU (local apic timer). When all
CPUs are idle and sleeping, we want to shut off this PIT timer as well.
That's why I added 'arch_all_cpus_idle' interface. One could argue that
this can be done as part of the dyn_tick->reprogram interface as well,
but I felt that having a separate arch_all_cpus_idle is cleaner and
makes it clear what its purpose is.
3. The fact that we want to manipulate the bitmap (set a bit when CPU is going
idle and unset it when it is waking up) _and_ the fact that want to take
some action when all CPUs are idle or when the first CPU is waking up,
requires the use of a spinlock, which is again not present in the ARM
implementation.
4. Again the fact that CPUs could be sleeping independent of each other
requires do_IRQ to check out whether the current CPU was sleeping as
its first step. If the CPU was sleeping, it needs to unset itself
from the bitmap _and_ if we are coming out of "all-cpu-asleep" state,
the PIT timer needs to be restarted as well as time recovered. Note
that these two steps need not be undertaken if we were not in
"all-cpus-asleep" state.
I don't see provisions for all these in the current ARM implementation.
In fact the x86 patch that Tony/Con posted didnt take into account most of these
as well, which is the reason I jumped in to fix the above issues.
5. Don't see how DYN_TICK_SKIPPING is being used. In SMP scenario,
it doesnt make sense since it will have to be per-cpu. The bitmap
that I talked of exactly tells that (whether a CPU is skipping
ticks or not).
6. S390 makes use of notifier mechanism to notify when CPUs are coming
in and out of idle state. Don't know how it will be used in other
arches. But obviously, if we are talking of unifying, we have to
provide one.
I hope this makes clear why some of the rework happened, which
in a way is extending the interface that ARM already has. Having
said all these, I do agree that having a consistent interface
is good (for example: x86 has dyn_tick_state structure whereas
ARM uses dyn_tick_timer strucuture itself to store the state etc).
--
Thanks and Regards,
Srivatsa Vaddagiri,
Linux Technology Center,
IBM Software Labs,
Bangalore, INDIA - 560017
next prev parent reply other threads:[~2005-09-05 5:33 UTC|newest]
Thread overview: 96+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-31 16:58 Updated dynamic tick patches Srivatsa Vaddagiri
2005-08-31 17:12 ` [PATCH 1/3] Updated dynamic tick patches - Fix lost tick calculation in timer_pm.c Srivatsa Vaddagiri
2005-08-31 22:36 ` Zachary Amsden
2005-08-31 22:47 ` john stultz
2005-09-02 15:43 ` [PATCH 1/3] dynticks - implement no idle hz for x86 Con Kolivas
2005-09-02 15:45 ` [PATCH 2/3] dyntick - Fix lost tick calculation in timer pm.c Con Kolivas
2005-09-02 15:46 ` [PATCH 3/3] dyntick - Recover walltime upon wakeup Con Kolivas
2005-09-02 17:25 ` [PATCH 2/3] dyntick - Fix lost tick calculation in timer pm.c Srivatsa Vaddagiri
2005-09-02 20:18 ` Thomas Schlichter
2005-09-02 21:21 ` john stultz
2005-09-02 16:56 ` [PATCH 1/3] dynticks - implement no idle hz for x86 Russell King
2005-09-02 17:12 ` Srivatsa Vaddagiri
2005-09-03 6:13 ` Con Kolivas
2005-09-03 7:58 ` Russell King
2005-09-03 8:01 ` Con Kolivas
2005-09-03 8:06 ` Russell King
2005-09-03 8:14 ` Con Kolivas
2005-09-04 20:10 ` Nishanth Aravamudan
2005-09-04 20:26 ` Russell King
2005-09-04 20:37 ` Nishanth Aravamudan
2005-09-04 21:17 ` Russell King
2005-09-05 3:08 ` Con Kolivas
2005-09-05 16:28 ` Nishanth Aravamudan
2005-09-05 6:58 ` Tony Lindgren
2005-09-05 16:30 ` Nishanth Aravamudan
2005-09-04 20:41 ` Nishanth Aravamudan
2005-09-05 5:32 ` Srivatsa Vaddagiri [this message]
2005-09-05 5:48 ` Nishanth Aravamudan
2005-09-05 6:32 ` Srivatsa Vaddagiri
2005-09-05 6:44 ` Nishanth Aravamudan
2005-09-06 20:51 ` Nishanth Aravamudan
2005-09-07 8:13 ` Tony Lindgren
2005-09-07 15:00 ` Nishanth Aravamudan
2005-09-07 15:53 ` Nishanth Aravamudan
2005-09-07 17:07 ` Srivatsa Vaddagiri
2005-09-07 17:23 ` Nishanth Aravamudan
2005-09-07 18:14 ` Srivatsa Vaddagiri
2005-09-07 18:22 ` Nishanth Aravamudan
2005-09-07 16:14 ` Bill Davidsen
2005-09-07 16:42 ` Nish Aravamudan
2005-09-07 17:17 ` Srivatsa Vaddagiri
2005-09-07 17:27 ` Nish Aravamudan
2005-09-07 18:18 ` Srivatsa Vaddagiri
2005-09-07 18:33 ` Nish Aravamudan
2005-09-09 16:27 ` Bill Davidsen
2005-09-05 7:37 ` Russell King
2005-09-05 7:49 ` Srivatsa Vaddagiri
2005-09-05 8:00 ` Russell King
2005-09-05 16:33 ` Nishanth Aravamudan
2005-09-05 7:00 ` Srivatsa Vaddagiri
2005-09-05 7:27 ` Tony Lindgren
2005-09-05 17:02 ` Nishanth Aravamudan
2005-09-07 7:37 ` Tony Lindgren
2005-09-07 15:05 ` Nishanth Aravamudan
2005-09-08 10:00 ` Tony Lindgren
2005-09-08 21:22 ` Nishanth Aravamudan
2005-09-08 22:08 ` Nishanth Aravamudan
2005-09-09 22:30 ` Nishanth Aravamudan
2005-09-20 11:06 ` Srivatsa Vaddagiri
2005-09-20 14:58 ` Nishanth Aravamudan
2005-09-22 13:38 ` Martin Schwidefsky
2005-09-22 14:52 ` Nishanth Aravamudan
2005-09-22 18:32 ` Srivatsa Vaddagiri
2005-09-26 15:08 ` Srivatsa Vaddagiri
2005-09-23 6:55 ` Srivatsa Vaddagiri
2005-09-05 7:44 ` Russell King
2005-09-05 8:19 ` Srivatsa Vaddagiri
2005-09-05 8:32 ` Russell King
2005-09-05 9:24 ` Srivatsa Vaddagiri
2005-09-05 17:06 ` Nishanth Aravamudan
2005-09-05 17:04 ` Nishanth Aravamudan
2005-09-05 17:27 ` Srivatsa Vaddagiri
2005-09-05 18:06 ` Nishanth Aravamudan
2005-09-05 13:19 ` Srivatsa Vaddagiri
2005-09-05 16:57 ` Nishanth Aravamudan
2005-09-05 17:25 ` Srivatsa Vaddagiri
2005-09-05 18:11 ` Nishanth Aravamudan
2005-09-03 4:05 ` [PATCH 1/3] Updated dynamic tick patches - Fix lost tick calculation in timer_pm.c Lee Revell
2005-09-03 4:18 ` Peter Williams
2005-09-03 4:34 ` Lee Revell
2005-09-03 4:48 ` Peter Williams
2005-09-03 5:15 ` Parag Warudkar
2005-09-03 5:30 ` Lee Revell
2005-09-03 5:20 ` Srivatsa Vaddagiri
2005-09-06 10:32 ` Pavel Machek
2005-09-06 10:46 ` Srivatsa Vaddagiri
2005-09-06 18:04 ` john stultz
2005-08-31 17:26 ` [PATCH 2/3] Updated dynamic tick patches - Cleanup Srivatsa Vaddagiri
2005-08-31 17:27 ` [PATCH 3/3] Updated dynamic tick patches - Recover walltime upon wakeup Srivatsa Vaddagiri
2005-09-01 5:23 ` Updated dynamic tick patches Con Kolivas
2005-09-01 13:07 ` Tony Lindgren
2005-09-01 13:19 ` David Weinehall
2005-09-01 13:46 ` Tony Lindgren
2005-09-01 14:11 ` Srivatsa Vaddagiri
2005-09-02 17:34 ` Srivatsa Vaddagiri
2005-09-03 10:16 ` Tony Lindgren
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=20050905053225.GA4294@in.ibm.com \
--to=vatsa@in.ibm.com \
--cc=akpm@osdl.org \
--cc=ck@vds.kolivas.org \
--cc=kernel@kolivas.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nacc@us.ibm.com \
--cc=rmk+lkml@arm.linux.org.uk \
/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.