* [GIT PULL] Nohz fixes
@ 2013-05-14 16:02 Frederic Weisbecker
0 siblings, 0 replies; 11+ messages in thread
From: Frederic Weisbecker @ 2013-05-14 16:02 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Frederic Weisbecker, Steven Rostedt, Paul E. McKenney,
Andrew Morton, Thomas Gleixner, H. Peter Anvin, Peter Zijlstra
Ingo,
Please pull the timers/urgent branch that can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
timers/urgent
Thanks,
Frederic
---
Steven Rostedt (2):
nohz: Disable LOCKUP_DETECTOR when NO_HZ_FULL is enabled
nohz: Warn if the machine can not perform nohz_full
kernel/time/tick-sched.c | 5 +++++
lib/Kconfig.debug | 2 ++
2 files changed, 7 insertions(+), 0 deletions(-)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [GIT PULL] nohz fixes
@ 2013-05-29 16:39 Frederic Weisbecker
2013-05-29 16:39 ` [PATCH] nohz: Prevent broadcast source from stealing full dynticks timekeeping duty Frederic Weisbecker
2013-05-30 23:38 ` [GIT PULL] nohz fixes Frederic Weisbecker
0 siblings, 2 replies; 11+ messages in thread
From: Frederic Weisbecker @ 2013-05-29 16:39 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Frederic Weisbecker, Steven Rostedt, Jiri Bohac,
Paul E. McKenney, Thomas Gleixner, Peter Zijlstra,
Borislav Petkov, Li Zhong, Srivatsa S. Bhat, Kevin Hilman,
Marcelo Tosatti, Gleb Natapov, Andrew Morton, Don Zickus,
Mike Galbraith, H. Peter Anvin
Ingo,
Please pull the timers/urgent-for-tip branch that can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
timers/urgent-for-tip
Only the 6th patch is new so I'm posting it along, the others have been
posted a few days ago.
Thanks,
Frederic
---
Frederic Weisbecker (4):
vtime: Use consistent clocks among nohz accounting
watchdog: Boot-disable by default on full dynticks
kvm: Move guest entry/exit APIs to context_tracking
nohz: Prevent broadcast source from stealing full dynticks timekeeping duty
Li Zhong (1):
nohz: Fix notifier return val that enforce timekeeping
Steven Rostedt (1):
nohz: Warn if the machine can not perform nohz_full
include/linux/context_tracking.h | 35 +++++++++++++++++++++++++++++++++++
include/linux/kvm_host.h | 37 +------------------------------------
include/linux/vtime.h | 4 ++--
kernel/context_tracking.c | 1 -
kernel/sched/core.c | 2 +-
kernel/sched/cputime.c | 6 +++---
kernel/time/tick-broadcast.c | 11 ++++++++---
kernel/time/tick-sched.c | 7 ++++++-
kernel/watchdog.c | 6 ++++++
9 files changed, 62 insertions(+), 47 deletions(-)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] nohz: Prevent broadcast source from stealing full dynticks timekeeping duty
2013-05-29 16:39 [GIT PULL] nohz fixes Frederic Weisbecker
@ 2013-05-29 16:39 ` Frederic Weisbecker
2013-05-30 13:57 ` Thomas Gleixner
2013-05-30 23:38 ` [GIT PULL] nohz fixes Frederic Weisbecker
1 sibling, 1 reply; 11+ messages in thread
From: Frederic Weisbecker @ 2013-05-29 16:39 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Frederic Weisbecker, Jiri Bohac, Steven Rostedt,
Paul E. McKenney, Thomas Gleixner, Peter Zijlstra,
Borislav Petkov
The timekeeping duty is currently assigned to the CPU that
handles the tick broadcast clock device by the time it is set in
one shot mode.
The reason for this is not entirely clear as outlined by Jiri
Bohac: https://patchwork.kernel.org/patch/2302951/
One could speculate though that it makes sure only one CPU
is woken up to fixup the timekeeping max deferment. But the
timekeeper can change anytime after the broadcast CPU becomes
idle. So probably we can remove this as in Jiri's patch, but
not late in the -rc's.
The issue we need to deal with now is that the timekeeping duty
must stay handled by the boot CPU in full dynticks mode for now.
Otherwise it prevents secondary CPUs from offlining and this breaks
suspend/shutdown/reboot/...
Long term plan is to make the timekeeper dynamic in full dynticks
as well but for now lets prevent that to happen to avoid breakages.
Reported-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Bohac <jbohac@suse.cz>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
---
kernel/time/tick-broadcast.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 24938d5..ed3a253 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -692,9 +692,14 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
bc->event_handler = tick_handle_oneshot_broadcast;
- /* Take the do_timer update */
- if (!tick_nohz_full_cpu(cpu))
- tick_do_timer_cpu = cpu;
+ /*
+ * Take the timekeeping duty unless we run in full
+ * dynticks mode that require the boot CPU to stay
+ * the timekeeper for now.
+ */
+#ifndef CONFIG_NO_HZ_FULL
+ tick_do_timer_cpu = cpu;
+#endif
/*
* We must be careful here. There might be other CPUs
--
1.7.5.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] nohz: Prevent broadcast source from stealing full dynticks timekeeping duty
2013-05-29 16:39 ` [PATCH] nohz: Prevent broadcast source from stealing full dynticks timekeeping duty Frederic Weisbecker
@ 2013-05-30 13:57 ` Thomas Gleixner
2013-05-30 14:22 ` Frederic Weisbecker
0 siblings, 1 reply; 11+ messages in thread
From: Thomas Gleixner @ 2013-05-30 13:57 UTC (permalink / raw)
To: Frederic Weisbecker
Cc: Ingo Molnar, LKML, Jiri Bohac, Steven Rostedt, Paul E. McKenney,
Peter Zijlstra, Borislav Petkov
On Wed, 29 May 2013, Frederic Weisbecker wrote:
> The timekeeping duty is currently assigned to the CPU that
> handles the tick broadcast clock device by the time it is set in
> one shot mode.
>
> The reason for this is not entirely clear as outlined by Jiri
> Bohac: https://patchwork.kernel.org/patch/2302951/
>
> One could speculate though that it makes sure only one CPU
> is woken up to fixup the timekeeping max deferment. But the
> timekeeper can change anytime after the broadcast CPU becomes
> idle. So probably we can remove this as in Jiri's patch, but
> not late in the -rc's.
Looking at commit 7300711e (clockevents: broadcast fixup possible
waiters) which introduced that takeover, I really can't see a reason
why we must do that. It's safe to remove it completely even now.
Thanks,
tglx
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] nohz: Prevent broadcast source from stealing full dynticks timekeeping duty
2013-05-30 13:57 ` Thomas Gleixner
@ 2013-05-30 14:22 ` Frederic Weisbecker
2013-05-30 14:39 ` Thomas Gleixner
0 siblings, 1 reply; 11+ messages in thread
From: Frederic Weisbecker @ 2013-05-30 14:22 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Ingo Molnar, LKML, Jiri Bohac, Steven Rostedt, Paul E. McKenney,
Peter Zijlstra, Borislav Petkov
On Thu, May 30, 2013 at 03:57:17PM +0200, Thomas Gleixner wrote:
> On Wed, 29 May 2013, Frederic Weisbecker wrote:
>
> > The timekeeping duty is currently assigned to the CPU that
> > handles the tick broadcast clock device by the time it is set in
> > one shot mode.
> >
> > The reason for this is not entirely clear as outlined by Jiri
> > Bohac: https://patchwork.kernel.org/patch/2302951/
> >
> > One could speculate though that it makes sure only one CPU
> > is woken up to fixup the timekeeping max deferment. But the
> > timekeeper can change anytime after the broadcast CPU becomes
> > idle. So probably we can remove this as in Jiri's patch, but
> > not late in the -rc's.
>
> Looking at commit 7300711e (clockevents: broadcast fixup possible
> waiters) which introduced that takeover, I really can't see a reason
> why we must do that. It's safe to remove it completely even now.
Yeah it seems so, if you're ok I can commit https://patchwork.kernel.org/patch/2302951/
with your ack and send another pull request.
Thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] nohz: Prevent broadcast source from stealing full dynticks timekeeping duty
2013-05-30 14:22 ` Frederic Weisbecker
@ 2013-05-30 14:39 ` Thomas Gleixner
2013-05-30 23:35 ` [PATCH] tick: Remove useless timekeeping duty attribution to broadcast source Frederic Weisbecker
0 siblings, 1 reply; 11+ messages in thread
From: Thomas Gleixner @ 2013-05-30 14:39 UTC (permalink / raw)
To: Frederic Weisbecker
Cc: Ingo Molnar, LKML, Jiri Bohac, Steven Rostedt, Paul E. McKenney,
Peter Zijlstra, Borislav Petkov
On Thu, 30 May 2013, Frederic Weisbecker wrote:
> On Thu, May 30, 2013 at 03:57:17PM +0200, Thomas Gleixner wrote:
> > On Wed, 29 May 2013, Frederic Weisbecker wrote:
> >
> > > The timekeeping duty is currently assigned to the CPU that
> > > handles the tick broadcast clock device by the time it is set in
> > > one shot mode.
> > >
> > > The reason for this is not entirely clear as outlined by Jiri
> > > Bohac: https://patchwork.kernel.org/patch/2302951/
> > >
> > > One could speculate though that it makes sure only one CPU
> > > is woken up to fixup the timekeeping max deferment. But the
> > > timekeeper can change anytime after the broadcast CPU becomes
> > > idle. So probably we can remove this as in Jiri's patch, but
> > > not late in the -rc's.
> >
> > Looking at commit 7300711e (clockevents: broadcast fixup possible
> > waiters) which introduced that takeover, I really can't see a reason
> > why we must do that. It's safe to remove it completely even now.
>
> Yeah it seems so, if you're ok I can commit https://patchwork.kernel.org/patch/2302951/
> with your ack and send another pull request.
Yup.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] tick: Remove useless timekeeping duty attribution to broadcast source
2013-05-30 14:39 ` Thomas Gleixner
@ 2013-05-30 23:35 ` Frederic Weisbecker
0 siblings, 0 replies; 11+ messages in thread
From: Frederic Weisbecker @ 2013-05-30 23:35 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner
Cc: LKML, Jiri Bohac, Steven Rostedt, Paul E. McKenney, Ingo Molnar,
Peter Zijlstra, Borislav Petkov, Frederic Weisbecker
From: Jiri Bohac <jbohac@suse.cz>
Since 7300711e ("clockevents: broadcast fixup possible waiters"),
the timekeeping duty is assigned to the CPU that handles the tick
broadcast clock device by the time it is set in one shot mode.
This is an issue in full dynticks mode where the timekeeping duty
must stay handled by the boot CPU for now. Otherwise it prevents
secondary CPUs from offlining and this breaks
suspend/shutdown/reboot/...
As it appears there is no reason for this timekeeping duty to be
moved to the broadcast CPU, besides nothing prevent it from being
later re-assigned to another target, let's simply remove it.
Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Reported-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
kernel/time/tick-broadcast.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 24938d5..ee316b9 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -692,10 +692,6 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
bc->event_handler = tick_handle_oneshot_broadcast;
- /* Take the do_timer update */
- if (!tick_nohz_full_cpu(cpu))
- tick_do_timer_cpu = cpu;
-
/*
* We must be careful here. There might be other CPUs
* waiting for periodic broadcast. We need to set the
--
1.7.5.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [GIT PULL] nohz fixes
2013-05-29 16:39 [GIT PULL] nohz fixes Frederic Weisbecker
2013-05-29 16:39 ` [PATCH] nohz: Prevent broadcast source from stealing full dynticks timekeeping duty Frederic Weisbecker
@ 2013-05-30 23:38 ` Frederic Weisbecker
2013-05-31 10:02 ` Ingo Molnar
1 sibling, 1 reply; 11+ messages in thread
From: Frederic Weisbecker @ 2013-05-30 23:38 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Steven Rostedt, Jiri Bohac, Paul E. McKenney,
Thomas Gleixner, Peter Zijlstra, Borislav Petkov, Li Zhong,
Srivatsa S. Bhat, Kevin Hilman, Marcelo Tosatti, Gleb Natapov,
Andrew Morton, Don Zickus, Mike Galbraith, H. Peter Anvin
On Wed, May 29, 2013 at 06:39:39PM +0200, Frederic Weisbecker wrote:
> Ingo,
>
> Please pull the timers/urgent-for-tip branch that can be found at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
> timers/urgent-for-tip
Please rather pull timers/urgent-for-tip-v2, it removes
"nohz: Prevent broadcast source from stealing full dynticks timekeeping duty"
and includes "tick: Remove useless timekeeping duty attribution to broadcast source"
instead, acked by Thomas.
Thanks.
>
> Only the 6th patch is new so I'm posting it along, the others have been
> posted a few days ago.
>
> Thanks,
> Frederic
> ---
>
> Frederic Weisbecker (4):
> vtime: Use consistent clocks among nohz accounting
> watchdog: Boot-disable by default on full dynticks
> kvm: Move guest entry/exit APIs to context_tracking
> nohz: Prevent broadcast source from stealing full dynticks timekeeping duty
>
> Li Zhong (1):
> nohz: Fix notifier return val that enforce timekeeping
>
> Steven Rostedt (1):
> nohz: Warn if the machine can not perform nohz_full
>
>
> include/linux/context_tracking.h | 35 +++++++++++++++++++++++++++++++++++
> include/linux/kvm_host.h | 37 +------------------------------------
> include/linux/vtime.h | 4 ++--
> kernel/context_tracking.c | 1 -
> kernel/sched/core.c | 2 +-
> kernel/sched/cputime.c | 6 +++---
> kernel/time/tick-broadcast.c | 11 ++++++++---
> kernel/time/tick-sched.c | 7 ++++++-
> kernel/watchdog.c | 6 ++++++
> 9 files changed, 62 insertions(+), 47 deletions(-)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [GIT PULL] nohz fixes
2013-05-30 23:38 ` [GIT PULL] nohz fixes Frederic Weisbecker
@ 2013-05-31 10:02 ` Ingo Molnar
0 siblings, 0 replies; 11+ messages in thread
From: Ingo Molnar @ 2013-05-31 10:02 UTC (permalink / raw)
To: Frederic Weisbecker
Cc: LKML, Steven Rostedt, Jiri Bohac, Paul E. McKenney,
Thomas Gleixner, Peter Zijlstra, Borislav Petkov, Li Zhong,
Srivatsa S. Bhat, Kevin Hilman, Marcelo Tosatti, Gleb Natapov,
Andrew Morton, Don Zickus, Mike Galbraith, H. Peter Anvin
* Frederic Weisbecker <fweisbec@gmail.com> wrote:
> On Wed, May 29, 2013 at 06:39:39PM +0200, Frederic Weisbecker wrote:
> > Ingo,
> >
> > Please pull the timers/urgent-for-tip branch that can be found at:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
> > timers/urgent-for-tip
>
> Please rather pull timers/urgent-for-tip-v2, it removes "nohz: Prevent
> broadcast source from stealing full dynticks timekeeping duty" and
> includes "tick: Remove useless timekeeping duty attribution to broadcast
> source" instead, acked by Thomas.
Applied, thanks a lot Frederic!
Ingo
^ permalink raw reply [flat|nested] 11+ messages in thread
* [GIT PULL] nohz fixes
@ 2013-07-24 19:08 Frederic Weisbecker
2013-07-25 21:04 ` Ingo Molnar
0 siblings, 1 reply; 11+ messages in thread
From: Frederic Weisbecker @ 2013-07-24 19:08 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Frederic Weisbecker, Li Zhong, Steven Rostedt,
Paul E. McKenney, Thomas Gleixner, Peter Zijlstra,
Borislav Petkov, Mike Galbraith, Kevin Hilman
Ingo,
Please pull the timers/urgent branch that can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
timers/urgent
Just one thing you need to know: you reported me that the warning was
"too much" to tell the user that he can't use full dynticks due to unstable tsc.
I discussed that with Steve and we concluded that we could keep the warning but
only trigger it if the user explicitly wants to use the full dynticks which we
deduce by checking if he filled the nohz_full= boot parameter or he selected
CONFIG_NO_HZ_FULL_ALL. This way we make sure that the user knows what's going
on but only if he really expected to use it.
If you still consider the tainting warning to be too much a hammer, even if only
real users are warned, then tell me and I'll change that to some way you
prefer.
Thanks,
Frederic
---
Li Zhong (1):
nohz: fix compile warning in tick_nohz_init()
Steven Rostedt (1):
nohz: Do not warn about unstable tsc unless user uses nohz_full
kernel/time/tick-sched.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [GIT PULL] nohz fixes
2013-07-24 19:08 Frederic Weisbecker
@ 2013-07-25 21:04 ` Ingo Molnar
0 siblings, 0 replies; 11+ messages in thread
From: Ingo Molnar @ 2013-07-25 21:04 UTC (permalink / raw)
To: Frederic Weisbecker
Cc: LKML, Li Zhong, Steven Rostedt, Paul E. McKenney, Thomas Gleixner,
Peter Zijlstra, Borislav Petkov, Mike Galbraith, Kevin Hilman
* Frederic Weisbecker <fweisbec@gmail.com> wrote:
> Ingo,
>
> Please pull the timers/urgent branch that can be found at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
> timers/urgent
>
> Just one thing you need to know: you reported me that the warning was
> "too much" to tell the user that he can't use full dynticks due to unstable tsc.
>
> I discussed that with Steve and we concluded that we could keep the warning but
> only trigger it if the user explicitly wants to use the full dynticks which we
> deduce by checking if he filled the nohz_full= boot parameter or he selected
> CONFIG_NO_HZ_FULL_ALL. This way we make sure that the user knows what's going
> on but only if he really expected to use it.
>
> If you still consider the tainting warning to be too much a hammer, even if only
> real users are warned, then tell me and I'll change that to some way you
> prefer.
>
>
> Thanks,
> Frederic
> ---
>
> Li Zhong (1):
> nohz: fix compile warning in tick_nohz_init()
>
> Steven Rostedt (1):
> nohz: Do not warn about unstable tsc unless user uses nohz_full
>
>
> kernel/time/tick-sched.c | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
Pulled, thanks Frederic!
Ingo
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-07-25 21:04 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-29 16:39 [GIT PULL] nohz fixes Frederic Weisbecker
2013-05-29 16:39 ` [PATCH] nohz: Prevent broadcast source from stealing full dynticks timekeeping duty Frederic Weisbecker
2013-05-30 13:57 ` Thomas Gleixner
2013-05-30 14:22 ` Frederic Weisbecker
2013-05-30 14:39 ` Thomas Gleixner
2013-05-30 23:35 ` [PATCH] tick: Remove useless timekeeping duty attribution to broadcast source Frederic Weisbecker
2013-05-30 23:38 ` [GIT PULL] nohz fixes Frederic Weisbecker
2013-05-31 10:02 ` Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2013-07-24 19:08 Frederic Weisbecker
2013-07-25 21:04 ` Ingo Molnar
2013-05-14 16:02 [GIT PULL] Nohz fixes Frederic Weisbecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox