The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	johnstul@us.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH/RFC 10/10] example of simple continuous gettimeofday
Date: Thu, 22 Dec 2005 11:29:42 +0100	[thread overview]
Message-ID: <1135247382.2806.122.camel@tglx.tec.linutronix.de> (raw)
In-Reply-To: <Pine.LNX.4.61.0512220028250.30930@scrub.home>

On Thu, 2005-12-22 at 00:30 +0100, Roman Zippel wrote:

> - I still don't like the idea of a generic gettimeofday() as it prevents
>   more optimized versions, e.g. on the one end with a 1MHz clock you only
>   have usec resolution anyway and this allows to keep almost everything
>   within 32bits. On the other end 64bit archs can avoid the "if (nsec >
>   NSEC_PER_SEC)" by doing something like ppc64 does, but requires a
>   different scaling of the values (to sec instead of nsec).

I strongly disagree. Moving this back into the architechture code for
some micro optimizations is the wrong way to go and a big step back from
Johns patches.

As John correctly analyzed we have dozens of gettimeofday/settimeofday
implementations which are roughly the same and I dont see a benefit to
keep it that way.

The timekeeping is a core functionality which should and can be
completely abstracted. This way we can ensure that the timekeeping is
consistent across architectures. So improvements and extensions to the
core code are immidiately available for all architectures rather than
updating 26 architecture implementations every time.

This allows to handle generic problems like suspend/resume, dynamic
ticks and others in a central place rather than scattered all over the
architecture code.

Same applies for clock source management and switching clock sources. 

> - the clock switch infrastructure can be merged with the clock set
>   mechanism. When setting a clock some internal variables have to be
>   updated as well, which can be reused for the clock switch basically
>   by setting the clock immediately before the switch, so that both
>   clocks run synchronously for a few cycles.

This is a question of implementation details rather than a design
question. 

Can we please concentrate on a clear and generic design model before
discussing optimizations of 20 lines of code? 

	tglx



  parent reply	other threads:[~2005-12-22 10:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-21 23:30 [PATCH/RFC 10/10] example of simple continuous gettimeofday Roman Zippel
2005-12-22  2:43 ` john stultz
2005-12-22  9:01   ` Ingo Molnar
2005-12-25 20:54   ` Roman Zippel
2006-01-20  4:01     ` john stultz
2005-12-22 10:29 ` Thomas Gleixner [this message]
2005-12-25 16:50   ` Roman Zippel

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=1135247382.2806.122.camel@tglx.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=zippel@linux-m68k.org \
    /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