public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Christoph Lameter <cl@linux.com>
Cc: Ingo Molnar <mingo@elte.hu>, linux-kernel@vger.kernel.org
Subject: Re: Scheduler regression: Too frequent timer interrupts(?)
Date: Fri, 17 Apr 2009 20:58:39 +0200	[thread overview]
Message-ID: <1239994719.23397.4979.camel@laptop> (raw)
In-Reply-To: <alpine.DEB.1.10.0904171410540.28536@qirst.com>

On Fri, 2009-04-17 at 14:20 -0400, Christoph Lameter wrote:
> On Fri, 17 Apr 2009, Peter Zijlstra wrote:
> 
> > Something like this is nice to compare between kernels. Chris'
> > suggestion of timing a simple fixed loop:
> >
> > $ time (let i=1000000; while [ $i -gt 0 ]; do let i--; done)
> >
> > real    0m14.389s
> > user    0m13.787s
> > sys     0m0.498s
> >
> > Is also useful, since it gives an absolute measure of time available to
> > user-space.
> >
> > Although I suspect a simple C while(i--); might be better due to less
> > code involved.
> 
> The absolute time available to user space is not that important. It is
> important that the processor stays available during latency critical
> operations and is not taken away by the OS. The intervals that the OS
> takes the processor away determine the mininum interval that the
> application has to react to events (f.e. RDMA transfers via Infiniband,
> or operations on requests coming in via shared memory). These operations
> often must occur in parallel on multiple cores. Processing is delayed if
> any of the cores encounters a delay due to OS noise.

So you have hard deadlines in the order of us? Are these SCHED_FIFO
tasks or SCHED_OTHER?

> The latencytest code simulates a busy processor (no system calls, all
> memory is prefaulted). For some reasons Linux is increasingly taking time
> away from such processes (that intentionally run uncontended on a
> dedicated processor). This causes regressions so that current upstream is
> not usable for these applications.
> 
> It would be best for these applications if the processor would be left
> undisturbed. There is likely not much that the OS needs to do on a busy
> processor if there are no competing threads and if there is no I/O taking
> place.

Agreed -- that would be nice.

I can't really match the pattern to anything. The one thing that worried
me was sched_clock_tick(), which does a GTOD to sync the clocks between
cpus.

Your Xeon is a core2 class machine and should have relatively stable
TSC, however its also a dual socket, which I think defeats the
stable-ness.

What clocksource do you have?

cat /sys/devices/system/clocksource/clocksource0/current_clocksource

Thing is, that doesn't really match the .23 is expensive and .25 isn't.

Also, looking over the rest of the scheduler tick code, I can't really
see what would be so expensive.


  reply	other threads:[~2009-04-17 18:58 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-16 19:53 Scheduler regression: Too frequent timer interrupts(?) Christoph Lameter
2009-04-17  7:00 ` Peter Zijlstra
2009-04-17 13:42   ` Christoph Lameter
2009-04-17 14:16     ` Peter Zijlstra
2009-04-17 14:29       ` Christoph Lameter
2009-04-17 14:51         ` Peter Zijlstra
2009-04-17 15:04           ` Christoph Lameter
2009-04-17 15:28             ` Peter Zijlstra
2009-04-23  4:42               ` Pavel Machek
2009-04-28 21:02                 ` Christoph Lameter
2009-04-28 21:23                   ` Peter Zijlstra
2009-04-28 21:21                     ` Christoph Lameter
2009-04-17 15:35             ` Ingo Molnar
2009-04-17 15:55               ` Christoph Lameter
2009-04-17 16:23                 ` Peter Zijlstra
2009-04-17 16:33                   ` Christoph Lameter
2009-04-17 16:49                   ` Ingo Molnar
2009-04-17 17:19                     ` Chris Friesen
2009-04-17 17:45                     ` Christoph Lameter
2009-04-17 18:11                       ` Peter Zijlstra
2009-04-17 18:20                         ` Christoph Lameter
2009-04-17 18:58                           ` Peter Zijlstra [this message]
2009-04-17 20:34                             ` Christoph Lameter
2009-04-17 20:53                               ` Peter Zijlstra
2009-04-17 23:24                           ` Chris Friesen
2009-04-18  7:35                             ` Ingo Molnar
2009-04-18  7:59                             ` 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=1239994719.23397.4979.camel@laptop \
    --to=peterz@infradead.org \
    --cc=cl@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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