public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	lethal@linux-sh.org, johnstul@us.ibm.com, mingo@redhat.com,
	tglx@linutronix.de
Subject: Re: [RFC] Reentrant clock sources
Date: Tue, 25 Nov 2008 15:55:01 +0100	[thread overview]
Message-ID: <20081125145501.GC14147@elte.hu> (raw)
In-Reply-To: <20081125132823.8698.83248.sendpatchset@rx1.opensource.se>


* Magnus Damm <magnus.damm@gmail.com> 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.

No, there's no real reason, and cleaner code is welcome :-)

Historically most clocksource drivers started out as static and 
standalone entities and hence they always knew how to access their own 
data structures. Passing in cs and generalizing it along that line is 
certainly cleaner.

I'd suggest to not do this by wide-scale breakage of the ->read() API 
though: please introduce a ->read2() method instead, and extend GTOD 
to make use of it if it's present. This way we can gradually migrate 
to ->read2() and then remove the ->read() method atomically once the 
conversion has been finished.

> 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?
> 
> I realize that there are quite a few clock source drivers that need 
> to be modified, any recommendation on which tree to do it against 
> and how to split up the patch? Thanks.

the timer tree is in tip/auto-timers-next, integrated into tip/master:

    http://people.redhat.com/mingo/tip.git/README

and also propagated towards linux-next. Not much is pending at the 
moment so you can work against -git too if you prefer that.

	Ingo

  reply	other threads:[~2008-11-25 14:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-25 13:28 [RFC] Reentrant clock sources Magnus Damm
2008-11-25 14:55 ` Ingo Molnar [this message]
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

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=20081125145501.GC14147@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=johnstul@us.ibm.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --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