linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Chris Friesen" <cfriesen@nortel.com>
To: linuxppc-dev@ozlabs.org
Subject: help? baffled trying to figure out where time is being spent
Date: Fri, 07 Jul 2006 20:05:34 -0600	[thread overview]
Message-ID: <44AF12EE.9030008@nortel.com> (raw)

Hi guys,

I'm looking at the following instrumented code.  This is part of an 
instrumented version of scheduler_tick(), running on what is essentially 
a "maple" board.  Dual 970fx, 4GB of memory.  Modified 2.6.10.

Shortly after initial boot, on cpu1, it seems like somehow there is a 
huge time gap between where "c" gets assigned and where "d" gets 
assigned in the code below.

The time gap between "c" and "d" is about 4.2 seconds.
The time gap between "aj" and "bj" is about 6.17 seconds.

The next time through the loop, the printk() triggers with a complaint 
that it took 6381 ticks between scheduler_tick() calls.

I'm baffled as to where the gap is coming from.  Any ideas?

Interrupts are for certain disabled while this code runs.  The printk 
statement is not being reached, so the "sched_delta" check is failing.

The gethrtime() function simply reads the tbr on ppc64, so it maps to a 
single instruction.



b=gethrtime();
	sched_delta = schedtime - __get_cpu_var(last_sched_tick);
c=gethrtime();
aj=jiffies;
	if (sched_delta > SCHED_INTERVAL_THRESH) {
		/* disable exception history if specified */
		if (disable_hist_on_event)
			disable_history_buffer = 1;
		printk(KERN_WARNING "cpu%d: jiffies: %lu, hrtime: %llu, %lu ticks 
between scheduler_tick() calls\n",
			smp_processor_id(), schedtime, (unsigned long long) gethrtime(), 
sched_delta);
	}
d=gethrtime();
bj=jiffies;



Chris

                 reply	other threads:[~2006-07-08  2:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=44AF12EE.9030008@nortel.com \
    --to=cfriesen@nortel.com \
    --cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).