public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* increased number of cycles
@ 2007-11-18  5:31 kernel coder
  2007-11-18 13:48 ` Wander Winkelhorst
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: kernel coder @ 2007-11-18  5:31 UTC (permalink / raw)
  To: linux-kernel

hi,
        I'm trying to add some code to netif_receive_skb function in
dev.c file . The cycles consumed by that code was around 16 cycles on
Dual Core Opetron machine.I'm working on that code for last 6 months
now and the consumed cycles have always been around 16 cycles .I don't
touch any other part of kernel .

But for last 4 days the consumed cycles have suddenly increased to
around 35 cycles . I'm using RDTSC instruction to profile the
code.There is no change in code and the kernel version is also the
same .I am assuming that there  must be something wrong with hardware.

Please guide me how can i figure out the root cause.What areas should
i look at to find out the reason for increased number of cycles.I
don't think that there is any issue in kernel because the kernel
version and code  is same    . Can the the log messages during system
bootup help me to diagnose the problem


shahzad

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: increased number of cycles
  2007-11-18  5:31 increased number of cycles kernel coder
@ 2007-11-18 13:48 ` Wander Winkelhorst
  2007-11-18 14:39 ` Mark Lord
  2007-11-20  1:24 ` Arjan van de Ven
  2 siblings, 0 replies; 4+ messages in thread
From: Wander Winkelhorst @ 2007-11-18 13:48 UTC (permalink / raw)
  To: kernel coder; +Cc: linux-kernel

> But for last 4 days the consumed cycles have suddenly increased to
> around 35 cycles . I'm using RDTSC instruction to profile the
> code.There is no change in code and the kernel version is also the
> same .I am assuming that there  must be something wrong with hardware.
>
> Please guide me how can i figure out the root cause.What areas should

Maybe you have a new version of GCC now? (auto-update or something?)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: increased number of cycles
  2007-11-18  5:31 increased number of cycles kernel coder
  2007-11-18 13:48 ` Wander Winkelhorst
@ 2007-11-18 14:39 ` Mark Lord
  2007-11-20  1:24 ` Arjan van de Ven
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Lord @ 2007-11-18 14:39 UTC (permalink / raw)
  To: kernel coder; +Cc: linux-kernel

kernel coder wrote:
> hi,
>         I'm trying to add some code to netif_receive_skb function in
> dev.c file . The cycles consumed by that code was around 16 cycles on
> Dual Core Opetron machine.I'm working on that code for last 6 months
> now and the consumed cycles have always been around 16 cycles .I don't
> touch any other part of kernel .
> 
> But for last 4 days the consumed cycles have suddenly increased to
> around 35 cycles . I'm using RDTSC instruction to profile the
> code.There is no change in code and the kernel version is also the
> same .I am assuming that there  must be something wrong with hardware.
..

A cache miss ?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: increased number of cycles
  2007-11-18  5:31 increased number of cycles kernel coder
  2007-11-18 13:48 ` Wander Winkelhorst
  2007-11-18 14:39 ` Mark Lord
@ 2007-11-20  1:24 ` Arjan van de Ven
  2 siblings, 0 replies; 4+ messages in thread
From: Arjan van de Ven @ 2007-11-20  1:24 UTC (permalink / raw)
  To: kernel coder; +Cc: linux-kernel

On Sat, 17 Nov 2007 21:31:25 -0800
"kernel coder" <lhrkernelcoder@gmail.com> wrote:

> hi,
>         I'm trying to add some code to netif_receive_skb function in
> dev.c file . The cycles consumed by that code was around 16 cycles on
> Dual Core Opetron machine.I'm working on that code for last 6 months
> now and the consumed cycles have always been around 16 cycles .I don't
> touch any other part of kernel .
> 
> But for last 4 days the consumed cycles have suddenly increased to
> around 35 cycles . I'm using RDTSC instruction to profile the
> code.There is no change in code and the kernel version is also the
> same .I am assuming that there  must be something wrong with hardware.

note that profiling a section that takes this short with rdtsc is...
not really working well in practice; you're profiling something that's
smaller (or at least roughly the same size) than the cpu's out of order
speculation window, so your rdtsc greatly impacts what is actually
happening in the code.

as for the change... 16->35 cycles can well be a code or data alignment
change or even a branch misprediction due to some minor code generation
issue.... you're looking at a small microscopic part of the universe
after all, the butterfly in the pacific WILL influence you ;-)

-- 
If you want to reach me at my work email, use arjan@linux.intel.com
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-11-20  1:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-18  5:31 increased number of cycles kernel coder
2007-11-18 13:48 ` Wander Winkelhorst
2007-11-18 14:39 ` Mark Lord
2007-11-20  1:24 ` Arjan van de Ven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox