public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Dave Jones <davej@redhat.com>, Lee Revell <rlrevell@joe-job.com>,
	Hugh Dickins <hugh@veritas.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@osdl.org>
Subject: Re: [patch] latency tracer, 2.6.15-rc7
Date: Thu, 29 Dec 2005 11:17:36 +0100	[thread overview]
Message-ID: <20051229101736.GA2560@elte.hu> (raw)
In-Reply-To: <20051229100233.GA12056@redhat.com>


* Dave Jones <davej@redhat.com> wrote:

>  > could test it by e.g. trying to reproduce the same VM latency as in the 
>  > -rt tree. [the two zlib patches are needed if you are using 4K stacks, 
>  > mcount increases stack footprint.]
> 
> kernel/latency.c: In function 'add_preempt_count_ti':
> kernel/latency.c:1703: warning: implicit declaration of function 'preempt_count_ti'
> kernel/latency.c:1703: error: invalid lvalue in assignment
> kernel/latency.c: In function 'sub_preempt_count_ti':
> kernel/latency.c:1764: error: invalid lvalue in assignment

indeed - i have fixed this and have uploaded a new version to:

   http://redhat.com/~mingo/latency-tracing-patches/

> interesting config options ...
> 
> # CONFIG_PREEMPT_NONE is not set
> CONFIG_PREEMPT_VOLUNTARY=y
> # CONFIG_PREEMPT is not set
> CONFIG_PREEMPT_BKL=y
> 
> CONFIG_WAKEUP_TIMING=y
> CONFIG_WAKEUP_LATENCY_HIST=y
> CONFIG_CRITICAL_IRQSOFF_TIMING=y
> CONFIG_INTERRUPT_OFF_HIST=y
> CONFIG_LATENCY_TRACE=y
> CONFIG_USE_FRAME_POINTER=y
> CONFIG_FRAME_POINTER=y

these are various things one might be interested in gathering on a live 
system. Enabling more of them means higher runtime overhead.  
WAKEUP_TIMING only measures the worst-case wakeup cost, it's the 
lowest-overhead option. It's activated via resetting the worst-case 
cost:

	echo 0 > /proc/sys/kernel/preempt_max_latency

The histogram ones are gathering a histogram (but no traces) into 
/proc/latency_hist/<cpu_nr>. These have some overhead as they hook into 
every preempt-disable/enable call. Output is:

  $ head -15 /proc/latency_hist/wakeup_latency/CPU0
  #Minimum latency: 2 microseconds.
  #Average latency: 7 microseconds.
  #Maximum latency: 511 microseconds.
  #Total samples: 5241
  #There are 0 samples greater or equal than 10240 microseconds
  #usecs           samples
      0                  0
      1                  0
      2                  7
      3               2041
      4                921
      5                194
      6                 62
      7                502
      8                119
  ...

The LATENCY_TRACING option does full tracing of critical sections 
[driven by e.g. WAKEUP_TIMING - but it can also be activated by 
interrupts, or be completely user-driven via userspace calls], which 
trace is then put into /proc/latency_trace - mcount done for every 
function call in the kernel. This can add up to 30% of runtime overhead 
[or worse], but is obviously very useful for debugging latencies.

	Ingo

  reply	other threads:[~2005-12-29 10:17 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-27 23:31 2.6.15-rc5: latency regression vs 2.6.14 in exit_mmap->free_pgtables Lee Revell
2005-12-28  2:46 ` Lee Revell
2005-12-28 22:59 ` Hugh Dickins
2005-12-29  0:00   ` Lee Revell
2005-12-29  8:22     ` [patch] latency tracer, 2.6.15-rc7 Ingo Molnar
2005-12-29 10:02       ` Dave Jones
2005-12-29 10:17         ` Ingo Molnar [this message]
2005-12-29 20:11           ` Lee Revell
2005-12-29 20:26             ` Lee Revell
2005-12-29 20:28               ` Ingo Molnar
2005-12-29 22:18                 ` Lee Revell
2005-12-30  0:08                 ` Grant Coady
2005-12-30  0:18                   ` Lee Revell
2005-12-30  0:42                     ` Grant Coady
2005-12-30  8:09                   ` Ingo Molnar
2005-12-30 16:51                     ` Linus Torvalds
2006-01-02 20:14                       ` Ingo Molnar
2006-01-19  1:49                         ` Lee Revell
2006-01-19  6:17                           ` Lee Revell
2005-12-31  0:20                     ` Grant Coady
2005-12-30  2:16                 ` Lee Revell
2005-12-30  8:00                   ` Ingo Molnar
2005-12-30 18:51                     ` Lee Revell
2005-12-31  0:51                     ` Lee Revell
2005-12-31  0:59                       ` Mark Knecht
2005-12-31  1:16                         ` Lee Revell
2005-12-31  1:30                         ` Lee Revell
2005-12-31  1:02                       ` Linus Torvalds
2005-12-31  1:15                         ` Lee Revell
2005-12-31  1:39                           ` Linus Torvalds
2005-12-31  3:54                             ` Lee Revell
2005-12-31  4:00                             ` Lee Revell
2005-12-31  4:29                               ` Paul E. McKenney
2005-12-31  4:54                                 ` Lee Revell
2005-12-31 20:14                                   ` Paul E. McKenney
2006-01-01  5:46                                     ` Lee Revell
2006-01-01 18:56                                       ` Linus Torvalds
2006-01-01 19:02                                         ` Lee Revell
2006-01-01 19:06                                           ` Lee Revell
2006-01-03 11:12                                         ` Dipankar Sarma
2006-01-03 13:28                                           ` David Lang
2006-01-03 14:11                                             ` Dipankar Sarma
2006-01-03 14:09                                     ` Dipankar Sarma
2006-01-03 15:55                                       ` Paul E. McKenney
2005-12-31  4:48                               ` Linus Torvalds
2006-01-01  8:32                           ` Lee Revell
2006-01-06 20:28       ` Lee Revell
2005-12-29  0:54   ` 2.6.15-rc5: latency regression vs 2.6.14 in exit_mmap->free_pgtables Lee Revell
2006-01-19  1:42   ` Lee Revell
2006-01-19  7:29     ` Hugh Dickins
2006-01-19  7:32       ` Lee Revell
2006-01-19  7:35       ` Lee Revell

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=20051229101736.GA2560@elte.hu \
    --to=mingo@elte.hu \
    --cc=davej@redhat.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rlrevell@joe-job.com \
    --cc=torvalds@osdl.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