mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: "Uwe Kleine-König" <Uwe.Kleine-Koenig@digi.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH, RFC] use hrtimer in sched_clock
Date: Mon, 14 Jul 2008 12:03:30 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.1.10.0807141156090.3283@apollo.tec.linutronix.de> (raw)
In-Reply-To: <20080714094847.GA7478@digi.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1173 bytes --]

On Mon, 14 Jul 2008, Uwe Kleine-König wrote:
> > > I tested the patch on arch-arm/mach-ns9xxx and it seem seams to work.
> > > But I admit I didn't test it deeply and I didn't measure if there is any
> > > overhead.
> > 
> > There is lots of overhead and your approach is simply wrong.
> I expected to have some overhead, but can you please elaborate on
> "simply wrong"?

It's wrong because it has a locking problem vs. xtime lock. Try
printk() in a code region which has xtime_lock write locked.

> > If you do a grep -r sched_clock arch/arm you'll find a couple of
> > examples how to override sched_clock().
> I new that and my purpose was to make this unneeded.  Would be nice,
> wouldn't it?

It would be nice, but it's simply not possible as each hardware
platform has a different hardware which is used for that. Also your
approach enforces that the hardware which is used for sched_clock is
the same as the one which is used for timekeeping. That's not
necessarily a good idea as we can use a less accurate and less
reliable hardware for sched_clock() than for timekeeping and we want
to do that when the sched_clock() hardware is faster to access.

Thanks,

	tglx

      reply	other threads:[~2008-07-14 10:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-11 20:55 Uwe Kleine-König
2008-07-14  9:30 ` Thomas Gleixner
2008-07-14  9:48   ` Uwe Kleine-König
2008-07-14 10:03     ` Thomas Gleixner [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=alpine.LFD.1.10.0807141156090.3283@apollo.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=Uwe.Kleine-Koenig@digi.com \
    --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

Powered by JetHome