public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@hp.com>
To: tony.luck@intel.com
Cc: Christoph Lameter <clameter@engr.sgi.com>,
	linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: [PATCH] optimize writer path in time_interpolator_get_counter()
Date: Wed, 03 Aug 2005 08:42:35 -0600	[thread overview]
Message-ID: <1123080155.5193.15.camel@tdi> (raw)
In-Reply-To: <200508021837.j72Ib7T9020681@agluck-lia64.sc.intel.com>

On Tue, 2005-08-02 at 11:37 -0700, tony.luck@intel.com wrote:

> Sadly, running my test case (running 1-4 tasks, each bound to a cpu, each pounding
> on gettimeofday(2)) I'm still seeing significant time spent spinning in this loop.
> Things are better: worst case time was down to just over 2ms from 34ms ... which
> is a significant improvement ... but 2ms still sounds ugly.

   I'll settle for an order of magnitude improvement for a first pass :)

> I'm still seeing the asymmetric behavior where cpu3 sees the really high times,
> while cpu0,1,2 are seeing peaks of 170us, which is still not pretty.

   How does cpu3's ITC synchronization compare to the others?  I suspect
there's some reasonable way that we could do a backoff w/i the do {}
while() loop, but I'm not sure what it is.  For a while, I was toying
around with the idea of how to convert:

	if (lcycle && time_after(lcycle, now))
		return lcycle;

into:

	if (lcycle && time_after(lcycle + min_delta, now))
		return lcycle;

But I don't know how that min_delta would be determined.  A "close
enough" factor like this would still prevent jitter, but would introduce
a minimum granularity increment of gettimeofday().  I think this might
be a reasonable performance vs absolute accuracy trade-off.  What
happens to your worst case time if you (just for a test) hard code a
min_delta of something around 20-50?  There could be some kind of
boot/run time tunable to set this min_delta if there's no good way to
calculate it.  It should be trivial to add something like this to the
fsys path as well and shouldn't disrupt the nojitter path at all.
Thanks,

	Alex

-- 
Alex Williamson                             HP Linux & Open Source Lab


  parent reply	other threads:[~2005-08-03 14:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-01 15:52 [PATCH] optimize writer path in time_interpolator_get_counter() Alex Williamson
2005-08-01 16:06 ` Christoph Lameter
2005-08-01 16:10   ` Alex Williamson
2005-08-02 18:37   ` tony.luck
2005-08-02 21:19     ` Christoph Lameter
2005-08-03 14:42     ` Alex Williamson [this message]
2005-08-03 16:10       ` Christoph Lameter
2005-08-03 16:32         ` Alex Williamson
2005-08-03 20:49           ` Christoph Lameter
  -- strict thread matches above, loose matches on Subject: below --
2005-08-02 21:50 Luck, Tony
2005-08-02 22:09 ` Christoph Lameter
2005-08-03 17:00 Luck, Tony

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=1123080155.5193.15.camel@tdi \
    --to=alex.williamson@hp.com \
    --cc=akpm@osdl.org \
    --cc=clameter@engr.sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --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