From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: "Li, Aubrey" <aubrey.li@linux.intel.com>,
Peter Zijlstra <peterz@infradead.org>,
"Brown, Len" <len.brown@intel.com>,
"alan@linux.intel.com" <alan@linux.intel.com>,
LKML <linux-kernel@vger.kernel.org>,
Linux PM list <linux-pm@vger.kernel.org>
Subject: Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state
Date: Mon, 26 Jan 2015 15:21:42 +0100 [thread overview]
Message-ID: <7916564.nnH80uMtkt@vostro.rjw.lan> (raw)
In-Reply-To: <alpine.DEB.2.11.1501260946390.5526@nanos>
On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote:
> On Mon, 26 Jan 2015, Li, Aubrey wrote:
> > On 2015/1/22 18:15, Thomas Gleixner wrote:
> > > Can we please stop adding more crap to that notifier thing? I rather
> > > see that go away than being expanded.
> >
> > Are you referring to FREEZE_PREPARE or remove all of FREEZE staff at all?
> >
> > What's the disadvantage of adding more notifier?
>
> clockevents_notify() is not a notifier. Its a multiplex call and I
> want to get rid of it and replace it with explicit functions.
OK, so perhaps we need to move _SUSPEND/_RESUME out of there to start with?
As far as I can say, clockevents_notify(CLOCK_EVT_NOTIFY_SUSPEND, NULL) and
clockevents_notify(CLOCK_EVT_NOTIFY_RESUME, NULL) are each only called from
one place and moreover, since they are in syscore_ops, we don't need any
locking around them.
So what about the patch below?
---
include/linux/clockchips.h | 2 --
kernel/time/clockevents.c | 9 ---------
kernel/time/timekeeping.c | 6 ++++--
3 files changed, 4 insertions(+), 13 deletions(-)
Index: linux-pm/include/linux/clockchips.h
===================================================================
--- linux-pm.orig/include/linux/clockchips.h
+++ linux-pm/include/linux/clockchips.h
@@ -16,8 +16,6 @@ enum clock_event_nofitiers {
CLOCK_EVT_NOTIFY_BROADCAST_FORCE,
CLOCK_EVT_NOTIFY_BROADCAST_ENTER,
CLOCK_EVT_NOTIFY_BROADCAST_EXIT,
- CLOCK_EVT_NOTIFY_SUSPEND,
- CLOCK_EVT_NOTIFY_RESUME,
CLOCK_EVT_NOTIFY_CPU_DYING,
CLOCK_EVT_NOTIFY_CPU_DEAD,
};
Index: linux-pm/kernel/time/clockevents.c
===================================================================
--- linux-pm.orig/kernel/time/clockevents.c
+++ linux-pm/kernel/time/clockevents.c
@@ -570,15 +570,6 @@ int clockevents_notify(unsigned long rea
tick_handover_do_timer(arg);
break;
- case CLOCK_EVT_NOTIFY_SUSPEND:
- tick_suspend();
- tick_suspend_broadcast();
- break;
-
- case CLOCK_EVT_NOTIFY_RESUME:
- tick_resume();
- break;
-
case CLOCK_EVT_NOTIFY_CPU_DEAD:
tick_shutdown_broadcast_oneshot(arg);
tick_shutdown_broadcast(arg);
Index: linux-pm/kernel/time/timekeeping.c
===================================================================
--- linux-pm.orig/kernel/time/timekeeping.c
+++ linux-pm/kernel/time/timekeeping.c
@@ -1245,7 +1245,7 @@ static void timekeeping_resume(void)
touch_softlockup_watchdog();
- clockevents_notify(CLOCK_EVT_NOTIFY_RESUME, NULL);
+ tick_resume();
/* Resume hrtimers */
hrtimers_resume();
@@ -1299,7 +1299,9 @@ static int timekeeping_suspend(void)
write_seqcount_end(&tk_core.seq);
raw_spin_unlock_irqrestore(&timekeeper_lock, flags);
- clockevents_notify(CLOCK_EVT_NOTIFY_SUSPEND, NULL);
+ tick_suspend();
+ tick_suspend_broadcast();
+
clocksource_suspend();
clockevents_suspend();
next prev parent reply other threads:[~2015-01-26 13:59 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-09 3:01 Li, Aubrey
2015-01-14 0:24 ` Li, Aubrey
2015-01-19 15:24 ` Rafael J. Wysocki
2015-01-22 10:15 ` Thomas Gleixner
2015-01-26 8:44 ` Li, Aubrey
2015-01-26 9:40 ` Thomas Gleixner
2015-01-26 14:21 ` Rafael J. Wysocki [this message]
2015-01-26 14:15 ` Thomas Gleixner
2015-01-26 14:45 ` Rafael J. Wysocki
2015-01-27 7:12 ` Li, Aubrey
2015-01-26 14:41 ` Rafael J. Wysocki
2015-01-26 14:24 ` Thomas Gleixner
2015-01-26 14:50 ` Rafael J. Wysocki
2015-01-26 14:34 ` Thomas Gleixner
2015-01-26 15:04 ` Rafael J. Wysocki
2015-01-27 8:03 ` Li, Aubrey
2015-01-27 15:10 ` Rafael J. Wysocki
2015-01-28 0:17 ` Li, Aubrey
2015-01-29 22:20 ` Rafael J. Wysocki
2015-02-06 1:20 ` [Update] " Rafael J. Wysocki
2015-02-06 16:14 ` Peter Zijlstra
2015-02-06 18:29 ` Peter Zijlstra
2015-02-06 22:36 ` Rafael J. Wysocki
2015-02-09 9:49 ` Peter Zijlstra
2015-02-09 14:50 ` Rafael J. Wysocki
2015-02-09 2:54 ` [Update 2x] " Rafael J. Wysocki
2015-02-09 15:20 ` Peter Zijlstra
2015-02-09 15:44 ` Peter Zijlstra
2015-02-09 23:57 ` Rafael J. Wysocki
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=7916564.nnH80uMtkt@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=alan@linux.intel.com \
--cc=aubrey.li@linux.intel.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®