mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Mohr <andi@lisas.de>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Andreas Mohr <andi@lisas.de>,
	Venki Pallipadi <venkatesh.pallipadi@intel.com>,
	linux-kernel@vger.kernel.org, shaohua.li@intel.com
Subject: Re: [PATCH] Prevent clockevent event_handler ending up handler_noop
Date: Wed, 3 Sep 2008 19:36:27 +0200	[thread overview]
Message-ID: <20080903173627.GA7767@rhlx01.hs-esslingen.de> (raw)
In-Reply-To: <alpine.LFD.1.10.0809031908270.3243@apollo.tec.linutronix.de>

Hi,

On Wed, Sep 03, 2008 at 07:15:16PM +0200, Thomas Gleixner wrote:
> On Wed, 3 Sep 2008, Andreas Mohr wrote:
> > See what such highres-deprived people as myself (PIT, acpi_pm,
> > _no_ HPET and thus no IRQed highres timer) are doing now,
> 
> Err. PIT + acpi_pm works with highres. acpi_pm is a stable clocksource
> and PIT is not a good, but a usable oneshot timer.

Hmm. What I'm interested in is longer wakeup timeouts (ACPI C2/C3
stuff), which would be a problem with PIT (~20 forced wakeups per second)
but with my new timer that would work.
Oh, side question: it _is_ easily possible to then disable PIT IRQs
once my event device is registered, right? Otherwise I could forget
about power management benefits...

And of course I'm interested in very short delays as well ("highres"),
which my timer could provide.

> > And any hints on how to possibly (reliably!) provide both clock_event_device
> > (oneshot) _and_ clocksource for a _single_ IRQed countdown timer?
> 
> No. For a reliable clocksource you need an ever increasing /
> decreasing counter, which just wraps around when the max. count is
> reached.
> 
> If you use a single shot timer, which is reprogrammed after every
> interrupt, then you will deviate from the time line as you have no
> idea how long it took from the counter reaching zero to the point
> where you reload the timer. Simply wont work.

Yup, that's exactly what I thought, slowly deviating from the timing
that it actually should have been, due to reprogramming...


So as I see it, the most beneficial thing I can do is to provide
a clock_event_device only.

Reasoning being that acpi_pm already is an easily accessible (fast)
reliable clocksource,
yet PIT is a _very_ slow (ISA timing) relatively coarse and
force-wakeupping event device.

Then additionally upgrade my driver to do mmapped access to this
PCI-MEM-capable sound card, and there we go with a fast and fine-grained
event device.

Out of interest: how big would you believe the benefit to be?
(overall system performance gains and ACPI PM benefits)

Thanks,

Andreas Mohr

  reply	other threads:[~2008-09-03 17:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-02 23:20 Venki Pallipadi
2008-09-02 23:31 ` Thomas Gleixner
2008-09-03 16:43 ` Andreas Mohr
2008-09-03 17:15   ` Thomas Gleixner
2008-09-03 17:36     ` Andreas Mohr [this message]
2008-09-03 19:01       ` Thomas Gleixner
2008-09-04  8:15         ` Andreas Mohr
2008-09-04  8:27           ` Thomas Gleixner

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=20080903173627.GA7767@rhlx01.hs-esslingen.de \
    --to=andi@lisas.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shaohua.li@intel.com \
    --cc=tglx@linutronix.de \
    --cc=venkatesh.pallipadi@intel.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 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®