From: Eric St-Laurent <ericstl34@sympatico.ca>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [patch] sched: make cpu_clock() not use the rq clock
Date: Thu, 26 Jul 2007 22:56:13 -0400 [thread overview]
Message-ID: <1185504973.6609.25.camel@perkele> (raw)
In-Reply-To: <20070726090012.GA5287@elte.hu>
On Thu, 2007-26-07 at 11:00 +0200, Ingo Molnar wrote:
> Subject: sched: make cpu_clock() not use the rq clock
> From: Ingo Molnar <mingo@elte.hu>
>
> it is enough to disable interrupts to get the precise rq-clock
> of the local CPU.
Hi Ingo,
Those new fast nanoseconds resolution clock APIs are nice but it seems
to me that their naming and _where_ they are implemented in the tree is
a little odd, IMO.
We have:
1. sched_clock() is in kernel/sched.c (weak implementation)
2. sched_clock() is in arch/i386/kernel/tsc.c (architecture override)
3. rq_clock() is in kernel/sched.c
4. cpu_clock() is in kernel/sched.c
I would suggest:
1. rename sched_clock() (remove sched_ as it's not sched specific
anymore) and place it in kernel/time/...
2. rename the architecture specific version of it too
This first function is the basic fast ns clock
3. base your rq_clock() on cpu_clock() (#4) or use the later directly.
This is local to sched.c
4. move cpu_clock() in kernel/time/...
This the per-cpu monotonic version.
See my point? Base the scheduler clock from a general kernel API, not
the other way around.
Just a suggestion.
Best regards,
- Eric
next prev parent reply other threads:[~2007-07-27 2:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-26 9:00 [patch] sched: make cpu_clock() not use the rq clock Ingo Molnar
2007-07-27 2:56 ` Eric St-Laurent [this message]
2007-07-29 6:03 ` Jeremy Fitzhardinge
2007-07-29 21:17 ` 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=1185504973.6609.25.camel@perkele \
--to=ericstl34@sympatico.ca \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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