mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: Ingo Molnar <mingo@elte.hu>, Andrew Morton <akpm@osdl.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch] hrtimer: round up relative start time on low-res arches
Date: Thu, 16 Feb 2006 11:06:10 -0800	[thread overview]
Message-ID: <1140116771.7028.31.camel@cog.beaverton.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0602161244240.30994@scrub.home>

On Thu, 2006-02-16 at 15:10 +0100, Roman Zippel wrote:
> On Wed, 15 Feb 2006, john stultz wrote:
> 
> > 	I just wanted to make sure you know I'm not ignoring your suggestions.
> > I do appreciate the time you have spent, and I have been continuing to
> > work on implementing your idea. Unfortunately the code is not trivial
> > and very much hurts the readability. I expect thats a sacrifice that
> > will be necessary, but hopefully after some review cycles we'll be able
> > to come to something we both like.
> 
> The code could be cleaned up a little, but the main difference is that my 
> code is much more compact, it lacks all the redundancy of your code, which 
> makes it harder to read. My hope was here instead of putting back the 
> code redundancy to add documentation instead, which would explain the 
> subtleties.
> I actually think that the basic principle of my code is quite simple, the 
> problem is that it's a little buried inbetween how the incremental updates 
> are done in my prototype, so after a little cleaning and separating the 
> special cases, I think my code would be a lot more readable.

I'll admit I'm slow, but since it has taken me a number of weeks to sort
out exactly the details of what is being done in your implementation,
and I *still* have bugs after re-implementing it, I'd not claim your
code is simple. The potential to be very precise and efficient: yes, but
not so trivial to follow.

(This is why I cringe at the idea of trying to implement it for each
clock like you're prototype suggested.)

Maybe when I send out the patch you can suggest improvements to the
comments or other ways to better clarify the code as you suggested
above.

> > I'm hoping to have a first pass patch I can mail this week.
> 
> I'm looking forward to it.
> BTW What do you think how difficult it would be to rebase your patches on 
> my NTP4 patches? 

I'd be very much open to it, although I haven't seen any further updates
to the code since I mailed you some feedback on them. Have you had a
chance to follow up on those?

> In the end the simplification of my patches should also 
> make your patches simpler, as it precalculates as much as possible and 
> reduces the work done in the fast paths. It would avoid a lot of extra 
> work, which you currently do.

Well, I'm still cautious, since it still has some dependencies on HZ
(see equation below), which I'm trying to avoid. However I don't think
your patches keep me from getting the info I need (or atleast, the info
I think I need ;). They do seem to help close the gap between what I
want and what you want, so I think they are a good step forward.

> The main problem that I see is that you need to drop the ppm calculations, 
> the new code provides a scaled nsec value per tick (tick_nsec + time_adj) 
> and you basically only need "(update - 10^9/HZ) / cycles" to calculate the 
> new multiplier adjustment.

My test patch does this already, although for now it calculates the ntp
interval (something like "tick_nsec + time_adj" in your code) from the
ppm value. That calculation would hopefully be replaced w/ some
ntp_get_interval() call that would pull the equivalent from your code.


> You also need to drop your ntp rework, the changes to the generic code 
> should be quite simple now, basically just exporting second_overflow() 
> and creating an alternative do_timer() entry point which doesn't call 
> update_wall_time().
> 
> Besides some small cleanups I think my code is ready for some serious 
> testing, but it conflicts with your NTP changes.

If you think they're ready, mail them to the list and I'll look them
over then take a swing at re-basing my work on top of them.

thanks
-john



  reply	other threads:[~2006-02-16 19:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-13  1:09 [PATCH 01/13] hrtimer: round up relative start time Roman Zippel
2006-02-13 10:52 ` Thomas Gleixner
2006-02-13 11:25   ` Roman Zippel
2006-02-13 13:01     ` Ingo Molnar
2006-02-13 13:42       ` Roman Zippel
2006-02-13 14:44         ` Ingo Molnar
2006-02-13 15:49           ` Roman Zippel
2006-02-13 19:55             ` Ingo Molnar
2006-02-13 22:29               ` Roman Zippel
2006-02-14  7:41     ` Ingo Molnar
2006-02-14 10:18       ` Roman Zippel
2006-02-14 12:20         ` [patch] hrtimer: round up relative start time on low-res arches Ingo Molnar
2006-02-14 21:51           ` Thomas Gleixner
2006-02-15  0:30           ` Roman Zippel
2006-02-15  9:19             ` Ingo Molnar
2006-02-15 12:26               ` Roman Zippel
2006-02-15 20:43                 ` john stultz
2006-02-16 14:10                   ` Roman Zippel
2006-02-16 19:06                     ` john stultz [this message]
2006-02-16 23:44                       ` Roman Zippel
2006-02-17  0:28                         ` john stultz
2006-02-17 15:02                           ` Roman Zippel
2006-02-14 10:26       ` [PATCH 01/13] hrtimer: round up relative start time Thomas Gleixner

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=1140116771.7028.31.camel@cog.beaverton.ibm.com \
    --to=johnstul@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --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

all inboxes | Powered by JetHome®