mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Magnus Damm" <magnus.damm@gmail.com>
To: "Thomas Gleixner" <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	lethal@linux-sh.org, johnstul@us.ibm.com, mingo@redhat.com
Subject: Re: [RFC] Reentrant clock sources
Date: Wed, 26 Nov 2008 14:32:45 +0900	[thread overview]
Message-ID: <aec7e5c30811252132p34e1d197k4a6babd5b27b042c@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.00.0811252215270.3235@localhost.localdomain>

On Wed, Nov 26, 2008 at 6:22 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> On Tue, 25 Nov 2008, Magnus Damm wrote:
>> Hi everyone,
>>
>> Is there any special reason behind the non-reentrant clock source
>> code? I'm writing some timer help code and getting the struct
>> clocksource as argument to the callbacks would make the code much
>> cleaner and better.
>
> Why do you want that ? And what has reentrancy to do with the
> clocksource argument to read() ?

I should have picked my words more carefully, sorry about that. I
simply want to get some context so my callbacks can access
per-instance private data such as ioport address or irq number. Right
now I have to get the context from somewhere else.

>> Extending the callbacks to be able to start and stop clock sources
>> for improved power management would be good too in my opinion.
>> Any thoughts?
>
> What have you in mind there ? Starting / stopping a clocksource when
> what happens ? You can't stop them randomly except you want to screw
> timekeeping.

Is changing clock source using sysfs known to screw up the time keeping?

# echo jiffies >
/sys/devices/system/clocksource/clocksource0/current_clocksource

The line above seems to work well with dynamic ticks disabled, but the
current code doesn't seem to handle the nohz -> periodic transition
very well.

>> +     cycle_t (*vread)(struct clocksource *cs);
>
> This is crap. vread can not access the clocksource.

Yeah, sorry about that. =)

Thanks for your comments.

/ magnus

      parent reply	other threads:[~2008-11-26  5:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-25 13:28 Magnus Damm
2008-11-25 14:55 ` Ingo Molnar
2008-11-25 21:22 ` Thomas Gleixner
2008-11-26  3:07   ` Ingo Molnar
2008-11-26  3:20     ` john stultz
2008-11-26  3:52       ` Ingo Molnar
2008-11-26  5:21         ` Magnus Damm
2008-11-26  5:32   ` Magnus Damm [this message]

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=aec7e5c30811252132p34e1d197k4a6babd5b27b042c@mail.gmail.com \
    --to=magnus.damm@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=johnstul@us.ibm.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --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®