From: Peter Zijlstra <peterz@infradead.org>
To: Robin Holt <holt@sgi.com>
Cc: Nick Piggin <npiggin@suse.de>, "Luck, Tony" <tony.luck@intel.com>,
Dimitri Sivanich <sivanich@sgi.com>,
"linux-ia64@vger.kernel.org" <linux-ia64@vger.kernel.org>,
Greg KH <greg@kroah.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Gregory Haskins <ghaskins@novell.com>,
Tony Luck <tony.luck@gmail.com>
Subject: Re: [PATCH] configure HAVE_UNSTABLE_SCHED_CLOCK for SGI_SN systems
Date: Wed, 07 Jan 2009 10:53:57 +0100 [thread overview]
Message-ID: <1231322037.11687.178.camel@twins> (raw)
In-Reply-To: <20090107094328.GD3850@sgi.com>
On Wed, 2009-01-07 at 03:43 -0600, Robin Holt wrote:
> On Wed, Jan 07, 2009 at 08:28:09AM +0100, Peter Zijlstra wrote:
> > That's basically what the HAVE_UNSTABLE_SCHED_CLOCK code does. It takes
> > a tick timestamp and tries to improve on that by using strict per cpu
> > sched_clock() deltas.
> >
> > What we do to obtain remote time, is basically calculate local time and
> > pull remote time fwd if that was behind.
>
> But what happens when the remote clock then takes a single tick and
> pulls forward a different remote clock by both your tick and its tick.
> Multiply that by 4096 and I am starting to feel that time is likely to
> go racing forward in a really random fashion.
I'm having trouble parsing that...
Clock state is kept per-cpu, and locked with a spinlock. When we request
a remote time-stamp we lock both our local and the remote clock state,
compute our local time, and set both the remote and local clock to the
max of local,remote clock.
An interrupt on the remote cpu will spin for its clock state lock before
doing anything - also, the tick interrupt will never bother with remote
clock state.
So I'm not exactly seeing what could go wrong here.
Please read kernel/sched_clock.c, its only 266 lines and could use an
extra eyeball, I'd be glad to answer any questions.
next prev parent reply other threads:[~2009-01-07 9:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-06 16:27 [PATCH] configure HAVE_UNSTABLE_SCHED_CLOCK for SGI_SN systems Dimitri Sivanich
2009-01-06 17:12 ` Greg KH
2009-01-06 20:15 ` Luck, Tony
2009-01-06 20:19 ` Robin Holt
2009-01-06 20:34 ` Luck, Tony
2009-01-06 20:57 ` Peter Zijlstra
2009-01-06 22:50 ` Robin Holt
2009-01-06 23:16 ` Peter Zijlstra
2009-01-07 3:00 ` Nick Piggin
2009-01-07 3:16 ` Jack Steiner
2009-01-07 7:28 ` Peter Zijlstra
2009-01-07 7:40 ` Nick Piggin
2009-01-07 9:43 ` Robin Holt
2009-01-07 9:53 ` Peter Zijlstra [this message]
2009-01-07 13:32 ` Dimitri Sivanich
2009-01-07 15:16 ` Peter Zijlstra
2009-01-15 18:48 ` Greg KH
2009-01-15 19:21 ` Luck, Tony
2009-01-22 19:04 ` Greg KH
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=1231322037.11687.178.camel@twins \
--to=peterz@infradead.org \
--cc=ghaskins@novell.com \
--cc=greg@kroah.com \
--cc=holt@sgi.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@suse.de \
--cc=sivanich@sgi.com \
--cc=tony.luck@gmail.com \
--cc=tony.luck@intel.com \
/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