Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: tglx@linutronix.de (Thomas Gleixner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clockevents: don't suspend/resume if unused
Date: Mon, 25 May 2015 22:11:15 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1505252208140.5457@nanos> (raw)
In-Reply-To: <20150525190641.GA7542@gradator.net>

On Mon, 25 May 2015, Sylvain Rochet wrote:
> On Mon, May 25, 2015 at 08:48:06PM +0200, Thomas Gleixner wrote:
> > On Fri, 16 Jan 2015, Alexandre Belloni wrote:
> > 
> > > There is no point in calling suspend/resume for unused
> > > clockevents as they are already stopped and disabled.
> > > 
> > > Furthermore, it can take some time to wait for some IPs to stop counting.
> > 
> > While I agree with the patch itself, I really can't understand that
> > last sentence.
> > 
> > If stuff is stopped and disabled, what takes time to stop counting?
> 
> Atmel PIT is a bit weird, writing to AT91_PIT_MR restarts the timer even 
> if you just want to stop it and then the only way to stop the timer is 
> to wait for a complete timer cycle.
> 
> The problem is not when suspending, restarting the timer just before 
> suspending is not such a problem because is will eventually stop at 
> some point in the future.
> 
> However it can takes a very long time if the system switchs to slow 
> clock, therefore when resuming the timer is still running and we have to 
> wait for the PIT to stop counting because we re-enabled it for one cycle 
> when suspending, which is weird, it adds about ~128ms resumt time for 
> Atmel SoC.
 
That's a reasonable explanation.

While timer IPs seem to be designed by janitors in general, this one
has an extraordinary level of stupidity.

Thanks,

	tglx

  reply	other threads:[~2015-05-25 20:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16  9:05 [PATCH] clockevents: don't suspend/resume if unused Alexandre Belloni
2015-01-16  9:20 ` Sylvain Rochet
2015-01-16 11:17   ` Russell King - ARM Linux
2015-01-16 11:20     ` Russell King - ARM Linux
2015-01-16 16:59   ` Alexandre Belloni
2015-03-06 12:54     ` Alexandre Belloni
2015-05-25 16:19     ` Alexandre Belloni
2015-05-25 16:56     ` Thomas Gleixner
2015-05-25 18:48 ` Thomas Gleixner
2015-05-25 19:06   ` Sylvain Rochet
2015-05-25 20:11     ` Thomas Gleixner [this message]
2015-05-25 20:53       ` Sylvain Rochet

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=alpine.DEB.2.11.1505252208140.5457@nanos \
    --to=tglx@linutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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