public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Tim Bird <tim.bird@am.sony.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: How to use a different sched_clock() for ftrace on omap?
Date: Thu, 07 May 2009 10:34:26 -0700	[thread overview]
Message-ID: <8763gcrf4t.fsf@deeprootsystems.com> (raw)
In-Reply-To: <4A03181D.50900@am.sony.com> (Tim Bird's message of "Thu\, 7 May 2009 10\:19\:25 -0700")

Tim Bird <tim.bird@am.sony.com> writes:

> Kevin Hilman wrote:
>> Tim Bird <tim.bird@am.sony.com> writes:
>> 
>>> Hi all,
>>>
>>> I've worked up a replacement sched_clock for ftrace on my omap platform.
>>> The current sched_clock, based on the 32K timer, has low resolution and
>>> doesn't provide very useful results.
>>>
>>> Unfortunately, I'm not sure the best way to use my special one, in place
>>> of a common one in arch/arm/plat-omap/common.c
>> 
>> Hi Tim,
>> 
>> If you're comiling mach-omap1/time.c than you've enabled the
>> higher-resolution MPU timer with CONFIG_OMAP_MPU_TIMER, right?
>
> Yes.
>
>> In that case, you could make the one in plat-omap/common.c inside and
>> #ifndef CONFIG_OMAP_MPU_TIMER and put the new one in the MPU_TIMER
>> code.
>> 
>> To be complete, you should add the same to the mach-omap2/timer-gp.c
>> as well.
>
> I was trying to avoid using #ifdefs, but maybe in this case it
> makes sense.  There are tradeoffs in using the different timers
> (nicely described in plat-omap/Kconfig help entries), so IMHO it
> would be good to make this a config preference.

Yes, we have PM reasons for wanting to choose between the different
timers.

> I'll work up a patch in this style and send it along.

OK, please send it to linux-omap as well.

On a related note, and not your problem here but something that would
be nice to see is the default sched_clock implementation using the
clocksource instead of jiffies.

Then, platform code just registers its preferred clocksource and
sched_clock() gets the same resolution as the clocksource.  Not sure
how yet to handle clocksources being added and removed though...

Kevin

  reply	other threads:[~2009-05-07 17:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cyZbZ-7Eg-9@gated-at.bofh.it>
2009-05-07 14:08 ` How to use a different sched_clock() for ftrace on omap? Kevin Hilman
2009-05-07 17:19   ` Tim Bird
2009-05-07 17:34     ` Kevin Hilman [this message]
2009-05-06 23:54 Tim Bird
2009-05-07  0:34 ` Ryan Mallon
2009-05-07  8:51 ` Ingo Molnar
2009-05-07 13:56   ` Steven Rostedt
2009-05-07 13:59     ` Ingo Molnar

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=8763gcrf4t.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tim.bird@am.sony.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