All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Arjan van de Ven <arjan@infradead.org>
Cc: David Miller <davem@davemloft.net>,
	efault@gmx.de, elendil@planet.nl, parag.warudkar@gmail.com,
	mingo@elte.hu, linux-kernel@vger.kernel.org, guichaz@yahoo.fr,
	andi@firstfloor.org
Subject: Re: 'global' rq->clock
Date: Sun, 04 May 2008 14:12:36 +0200	[thread overview]
Message-ID: <1209903157.6929.54.camel@lappy> (raw)
In-Reply-To: <20080502030930.6098d8ff@infradead.org>

On Fri, 2008-05-02 at 03:09 -0700, Arjan van de Ven wrote:
> On Fri, 02 May 2008 14:48:27 -0700 (PDT)
> David Miller <davem@davemloft.net> wrote:
> 
> > From: Peter Zijlstra <a.p.zijlstra@chello.nl>
> > Date: Fri, 02 May 2008 21:56:26 +0200
> > 
> > > Ok, the the below would need something that relates
> > > tick_timestamp's to one another.. probably sucks without it..
> > > 
> > > OTOH, Andi said he was working on a fastish global sched_clock()
> > > thingy, Andi got a link to that code?
> > 
> > While I'm fine with this kind of stuff being added to constantly cope
> > with x86's joke of a TSC register implementation, it's starting to
> > become an enormous burdon for platforms where the TICK source actually
> > works properly.
> 
> it's a sad affair indeed. On some systems it counts cycles, on other
> systems it counts time. On most systems it stops while idle, on others
> it keeps running. On most systems its not very synchronized between
> packages, and on some systems it's not even synchronized between cores.
> 
> I'm not convinced TSC is the right thing for the scheduler in the first
> place; on current x86 systems TSC counts "time" not "work done". Now of
> course "time" is an approximation for "work done", but not a very good
> one given the presence of what effectively is variable cpu speeds
> (software CPU frequency control is only part of that; there's also the
> finegrained hardware level frequency control as done by what marketing
> people call "Intel Dynamic Acceleration technology"). [*]
> 
> I and others have talked to Peter about this already, and I'm sure we'll
> talk more about it in the future as well.. at some point this part of
> CFS needs to fundamentally be cleaned up. Since this gets into a debate 
> about what fairness means ;(

> [*] The converse is also true; cycles aren't a good representation of
> time either; this makes cycle based profilers a bit iffy if you're
> interested in where the system spends time rather than where it spends
> cycles.

My current view on this is that per cpu scheduling should use a time
based clock, whereas smp load balancing can take the cycle (ie work)
counter to balance different work/time loads and estimate core power.

As for using the TSC, I'm afraid we just don't have any choice. Although
I guess we could dynamically detect some counter on new cpus and use
that when available. But the TSC is the only thing available on a lot of
existing machines.


  reply	other threads:[~2008-05-04 12:13 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-02  0:14 Horrendous Audio Stutter - current git Parag Warudkar
2008-05-02  8:34 ` Peter Zijlstra
2008-05-02 10:32   ` Frans Pop
2008-05-02 10:35     ` Peter Zijlstra
2008-05-02 11:08       ` Peter Zijlstra
2008-05-02 11:37         ` Frans Pop
2008-05-02 11:39           ` Peter Zijlstra
2008-05-02 11:45             ` Frans Pop
2008-05-02 11:51               ` Peter Zijlstra
2008-05-02 12:06             ` Frans Pop
2008-05-02 12:22               ` Parag Warudkar
2008-05-02 13:21                 ` Dhaval Giani
2008-05-02 11:10   ` Parag Warudkar
2008-05-02 12:09     ` Mike Galbraith
2008-05-02 12:21       ` Parag Warudkar
2008-05-02 12:37         ` Mike Galbraith
2008-05-02 15:02           ` Mike Galbraith
2008-05-02 15:49             ` Frans Pop
2008-05-02 18:53               ` Frans Pop
2008-05-02 19:27                 ` Mike Galbraith
2008-05-02 19:56                   ` 'global' rq->clock (was Re: Horrendous Audio Stutter - current git) Peter Zijlstra
2008-05-02 20:38                     ` Guillaume Chazarain
2008-05-02 20:46                       ` Peter Zijlstra
2008-05-02 22:00                         ` 'global' rq->clock David Miller
2008-05-02 21:48                     ` David Miller
2008-05-02 10:09                       ` Arjan van de Ven
2008-05-04 12:12                         ` Peter Zijlstra [this message]
2008-05-02 22:07                       ` Peter Zijlstra
2008-05-03  8:28                         ` Ingo Molnar
2008-05-03  9:05                           ` David Miller
2008-05-03 10:10                             ` Ingo Molnar
2008-05-03 19:27                               ` David Miller
2008-05-03 19:37                                 ` Ingo Molnar
2008-05-03 22:30                                 ` Benjamin Herrenschmidt
2008-05-03 22:38                                   ` Ingo Molnar
2008-05-03 23:04                                     ` David Miller
2008-05-03 23:36                                       ` David Miller
2008-05-03 23:38                                         ` Ingo Molnar
2008-05-03 23:40                                           ` David Miller
2008-05-03 23:47                                             ` Ingo Molnar
2008-05-04  2:22                                     ` Benjamin Herrenschmidt
2008-05-03 19:28                               ` David Miller
2008-05-03 19:39                                 ` Ingo Molnar
2008-05-03  6:20                     ` 'global' rq->clock (was Re: Horrendous Audio Stutter - current git) Mike Galbraith
2008-05-02 19:38               ` Horrendous Audio Stutter - current git Mike Galbraith
2008-05-03  7:13           ` Frans Pop
2008-05-03  7:39             ` Mike Galbraith
2008-05-07  8:26   ` Frans Pop
2008-05-07  8:32     ` Ingo Molnar

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=1209903157.6929.54.camel@lappy \
    --to=a.p.zijlstra@chello.nl \
    --cc=andi@firstfloor.org \
    --cc=arjan@infradead.org \
    --cc=davem@davemloft.net \
    --cc=efault@gmx.de \
    --cc=elendil@planet.nl \
    --cc=guichaz@yahoo.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=parag.warudkar@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.