public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Baruch Even <baruch@ev-en.org>
To: Dror Cohen <dror.xiv@gmail.com>
Cc: kernel list <linux-kernel@vger.kernel.org>
Subject: Re: Time Drift Compensation on Linux Clusters
Date: Thu, 03 Mar 2005 16:24:52 +0000	[thread overview]
Message-ID: <42273A54.30504@ev-en.org> (raw)
In-Reply-To: <6c58e3190503030650595cbd5@mail.gmail.com>

Dror Cohen wrote:
> Hi all,
> While working on a Linux cluster with kernel version 2.4.27 we've
> encountered a consistent clock drift problem. We have devised a fix
> for this problem which is based on the Pentium's TSC clock. We'd
> appreciate any comments on the validity of the proposed solution and
> on whether it might cause unexpected (and undesired) problems in other
> parts of the kernel.

That's an interesting solution to a problem I've seen in the past.

An issue with submission to LKML, you'd better submit a full patch in 
unified diff format with context, the best command for this is:
diff -Nurp kernel-old kernel-new

The possible problem from jumping multiple jiffies is that calculations 
might be skewed off, some are likely to be done based on the assumption 
of a single jiffie increase and some by looking at the difference of 
jiffies from some time in the past.

For example, the call immediately after the increment of jiffies assumes 
a single jiffie passed, but it is not necessarily true. I do not know 
what effects this might have probably nothing that didn't happen with 
the clock skew anyway.

What happens to the TSC when the CPU is halted due to idleness? I don't 
remember exactly but there are cases when it stops ticking and then your 
patch will not advance the clock at all.

You also advance the clock once too much, the condition should probably 
be (xtdc_last + xtdc_step < cycles).

There is also the issue of a loop with 64 bit operations/comparisons in 
the timer. Maybe this should be offloaded to the bh? The cost should be 
better thought of.

Baruch

  parent reply	other threads:[~2005-03-03 16:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-03 14:50 Time Drift Compensation on Linux Clusters Dror Cohen
2005-03-03 16:23 ` Chris Friesen
2005-03-03 16:24 ` Baruch Even [this message]
2005-03-03 17:34 ` Andi Kleen

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=42273A54.30504@ev-en.org \
    --to=baruch@ev-en.org \
    --cc=dror.xiv@gmail.com \
    --cc=linux-kernel@vger.kernel.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