mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* How to optimize system time for such case?
       [not found] <b3c691930611020047p4a59206aj3fc3060e2f74e426@mail.gmail.com>
@ 2006-11-02  8:52 ` FENG ZHOU
  2006-11-02 12:34   ` Livio Soares
  0 siblings, 1 reply; 4+ messages in thread
From: FENG ZHOU @ 2006-11-02  8:52 UTC (permalink / raw)
  To: linux-kernel

Hello, all
I am optimizing a compiler and I believe there is a bug in such
compile. Currently, I have a test case, which is a scientific
application, has a lot of system time. This is weird, because this
case does not have many system calls. Meanwhile, compiled at another
option, I found all the "system time" are gone! So, I assume there is
some problem in the first one (though both binary produce correct
result). I used some performance tuning tool and found the hottest
address for CPU privilege level change event is: 0xa000000100001a70.
This address is not in code or data segment. Now, I am kinda stuck
here. My question is: how to find what this address is? Or find out
what is the cause of the "system time"? Thanks in advance.

PS: the platform is Itanium 2.
-Feng

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

* Re: How to optimize system time for such case?
  2006-11-02  8:52 ` How to optimize system time for such case? FENG ZHOU
@ 2006-11-02 12:34   ` Livio Soares
  0 siblings, 0 replies; 4+ messages in thread
From: Livio Soares @ 2006-11-02 12:34 UTC (permalink / raw)
  To: FENG ZHOU; +Cc: linux-kernel

  Hi Feng,

FENG ZHOU writes:
> Hello, all
> I am optimizing a compiler and I believe there is a bug in such
> compile. Currently, I have a test case, which is a scientific
> application, has a lot of system time. This is weird, because this
> case does not have many system calls. Meanwhile, compiled at another
> option, I found all the "system time" are gone! So, I assume there is
> some problem in the first one (though both binary produce correct
> result). I used some performance tuning tool and found the hottest
> address for CPU privilege level change event is: 0xa000000100001a70.
> This address is not in code or data segment. Now, I am kinda stuck
> here. My question is: how to find what this address is? Or find out
> what is the cause of the "system time"? Thanks in advance.
>
> PS: the platform is Itanium 2.

  This address is from inside the kernel.  On the Itanium arch, kernel starts at
0xa000000100000000

  So you  want the to  see what  function in your  kernel is at  address 0x1a70.
Looking at arch/ia64/kernel/ivt.S, it could either be an "Instruction Key Miss",
which starts  at address  0x1800, but  I'm not sure  that function  reaches your
address. Also, the "page_fault" code is  right below the ikey_miss code, so that
could be  a culprit. To make sure,  please get your kernel  binary (vmlinux) and
disassemble it with objdump. Check in which function the 0x1a70 address lies.

  If  it's a  "Instruction Key  Miss",  your compiler  is _probably_  generating
instructions  incorrectly. If  it's page-faults,  well, data  is  being accessed
differently. 

  Also, Oprofile is a tool that is worth learning how to use:
http://oprofile.sf.net/

  good luck,

		Livio



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

* Re: How to optimize system time for such case?
       [not found] ` <b3c691930611020116n6ee14112lff7632be72e7df71@mail.gmail.com>
@ 2006-11-02  9:27   ` Daniel J Blueman
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel J Blueman @ 2006-11-02  9:27 UTC (permalink / raw)
  To: zhfeng.osprey; +Cc: Linux Kernel

On 02/11/06, miles <zhfeng.osprey@gmail.com> wrote:
> On 11/2/06, Daniel J Blueman <daniel.blueman@gmail.com> wrote:
> > FENG ZHOU wrote:
> > > Hello, all
> > > I am optimizing a compiler and I believe there is a bug in such
> > > compile. Currently, I have a test case, which is a scientific
> > > application, has a lot of system time. This is weird, because this
> > > case does not have many system calls. Meanwhile, compiled at another
> > > option, I found all the "system time" are gone! So, I assume there is
> > > some problem in the first one (though both binary produce correct
> > > result). I used some performance tuning tool and found the hottest
> > > address for CPU privilege level change event is: 0xa000000100001a70.
> > > This address is not in code or data segment. Now, I am kinda stuck
> > > here. My question is: how to find what this address is? Or find out
> > > what is the cause of the "system time"? Thanks in advance.
> > >
> > > PS: the platform is Itanium 2.
> > > -Feng
> >
> > First question is what kernel, second is how much memory?
> >
> > I recently had this experience (high system time) with some vendor
> > kernels with a system with 16GB of memory and 4-8GB processes. The VM
> > was trying to reclaim pages like crazy, but failing.
>
> The system is a debian3.1 with 2.6.8 #1 SMP kernel. The total memory is 4GB.
> Total number of processes is about 100. It is a SPEC CPU program.

I'd say it's worth a shot with a more modern kernel. There are
probably related bugs in that kernel. The one I had (related, but not
directly) problems with was 2.6.9 + vendor patches.
-- 
Daniel J Blueman

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

* Re: How to optimize system time for such case?
@ 2006-11-02  9:10 Daniel J Blueman
       [not found] ` <b3c691930611020116n6ee14112lff7632be72e7df71@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel J Blueman @ 2006-11-02  9:10 UTC (permalink / raw)
  To: zhfeng.osprey; +Cc: Linux Kernel

FENG ZHOU wrote:
> Hello, all
> I am optimizing a compiler and I believe there is a bug in such
> compile. Currently, I have a test case, which is a scientific
> application, has a lot of system time. This is weird, because this
> case does not have many system calls. Meanwhile, compiled at another
> option, I found all the "system time" are gone! So, I assume there is
> some problem in the first one (though both binary produce correct
> result). I used some performance tuning tool and found the hottest
> address for CPU privilege level change event is: 0xa000000100001a70.
> This address is not in code or data segment. Now, I am kinda stuck
> here. My question is: how to find what this address is? Or find out
> what is the cause of the "system time"? Thanks in advance.
>
> PS: the platform is Itanium 2.
> -Feng

First question is what kernel, second is how much memory?

I recently had this experience (high system time) with some vendor
kernels with a system with 16GB of memory and 4-8GB processes. The VM
was trying to reclaim pages like crazy, but failing.
-- 
Daniel J Blueman

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

end of thread, other threads:[~2006-11-02 12:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <b3c691930611020047p4a59206aj3fc3060e2f74e426@mail.gmail.com>
2006-11-02  8:52 ` How to optimize system time for such case? FENG ZHOU
2006-11-02 12:34   ` Livio Soares
2006-11-02  9:10 Daniel J Blueman
     [not found] ` <b3c691930611020116n6ee14112lff7632be72e7df71@mail.gmail.com>
2006-11-02  9:27   ` Daniel J Blueman

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

all inboxes | Powered by JetHome®