From: Ingo Molnar <mingo@elte.hu>
To: John Hawkes <hawkes@babylon.engr.sgi.com>
Cc: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org,
johnstul@us.ibm.com, Andrew Morton <akpm@osdl.org>
Subject: Re: [RFC][PATCH] 2.6.0-test11 sched_clock() broken for "drifty ITC"
Date: Sat, 20 Dec 2003 11:50:31 +0100 [thread overview]
Message-ID: <20031220105031.GA17848@elte.hu> (raw)
In-Reply-To: <200312182044.hBIKiCLY5477429@babylon.engr.sgi.com>
* John Hawkes <hawkes@babylon.engr.sgi.com> wrote:
> Some amount of code would need to be added to sched.c to deal with
> unsynchronized values: scheduler_tick() remembers a local jiffies-
> granularity sched_clock() in the runqueue struct, and load_balance's
> can_migrate_task() uses that saved timestamp to compare against the
> tested task->timestamp to determine cache-hot-or-not, rather than
> using the local CPU's sched_clock() value. Also, task->timestamp
> needs to be readjusted when the task migrates:
this is a tough problem that wont go away.
Even platforms where the per-CPU clock is supposed to be synchronized,
sometimes it isnt. (this is a recurring problem on x86 SMP - so x86 will
benefit from it too.)
the relaxation means the effective granularity reduction of the
migration decisions - but this is not a problem, migration latencies are
always a high multiple of the timer irq frequency. The cycle accuracy of
sched_clock() is otherwise very important for correct interactivity
decisions - but this is only used locally and is thus preserved by the
patch. The only area where this change can reduce the quality of
interactivity estimatio is when a task oscillates very quickly between
multiple CPUs and is also somehow relevant to interactivity.
So i believe the generic relaxing of sched_clock() synchronization is
the right thing to do. I like your patch. It adds minimal overhead and
solves a hard problem - nice work! Andrew, please apply it.
Ingo
next prev parent reply other threads:[~2003-12-20 10:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-18 20:44 [RFC][PATCH] 2.6.0-test11 sched_clock() broken for "drifty ITC" John Hawkes
2003-12-18 22:37 ` john stultz
2003-12-20 10:41 ` Andrew Morton
2003-12-20 10:50 ` Ingo Molnar [this message]
2003-12-20 14:57 ` Nick Piggin
2003-12-20 15:05 ` Andrew Morton
2003-12-20 15:12 ` Nick Piggin
2003-12-20 16:36 ` Ingo Molnar
2003-12-20 21:41 ` Zwane Mwaikambo
2003-12-29 18:51 ` John Hawkes
2003-12-29 19:32 ` [Lse-tech] " Martin J. Bligh
2003-12-29 20:16 ` John Hawkes
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=20031220105031.GA17848@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@osdl.org \
--cc=hawkes@babylon.engr.sgi.com \
--cc=johnstul@us.ibm.com \
--cc=linux-ia64@vger.kernel.org \
--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