* process time accounting
@ 1999-10-19 16:11 Lars Hjorth
1999-10-19 17:24 ` Jay.Estabrook
1999-10-19 17:52 ` Jay.Estabrook
0 siblings, 2 replies; 9+ messages in thread
From: Lars Hjorth @ 1999-10-19 16:11 UTC (permalink / raw)
To: axp-list
All,
I have noticed a problem where the statistics about cpu-usage for the
processes are invalid on my Compaq DS20 machine with Linux 2.2.9 SMP. The
statistics will only take time used on the first processor but not on the
second. Am I the only one to experience this?
Quick test: Make sure both CPU's have been working. Do cat /proc/stats.
This gives a printout that looks something like:
cpu 2718 0 8127 5046643
cpu0 2718 0 8127 2517899
cpu1 0 0 0 2528744
...
The first line corresponds to total cpu usage and the columns to user,
nice and system time. As you can see not a single "time-slice" have been
accounted for cpu1. The same problem applies to per process statistics.
I am not very well qualified in kernel debugging but I managed to find the
following clues:
* The macro smp_processor_id() (which is defined as current->processor)
always returns zero in function
smp_percpu_timer_interrupt (in file arch/alpha/kernel/smp.c) which is the
function that should update the statistics.
* The map between processor numbers and id's are okey. (and the inverse
mapping too)
* in the function handle_ipi the smp_processor_id() returns okey (both 0
and 1)
Any ideas what I should check next?
Grateful for any thoughts or ideas on this,
Lars
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: process time accounting
1999-10-19 16:11 process time accounting Lars Hjorth
@ 1999-10-19 17:24 ` Jay.Estabrook
1999-10-19 16:50 ` Lars Hjorth
1999-10-19 17:52 ` Jay.Estabrook
1 sibling, 1 reply; 9+ messages in thread
From: Jay.Estabrook @ 1999-10-19 17:24 UTC (permalink / raw)
To: axp-list
>>> Lars Hjorth said:
>
> I have noticed a problem where the statistics about cpu-usage for the
> processes are invalid on my Compaq DS20 machine with Linux 2.2.9 SMP. The
> statistics will only take time used on the first processor but not on the
> second. Am I the only one to experience this?
No, which is why its fixed in later sources... ;-}
Patch it by changing the appropriate line in include/asm-alpha/ptrace.h to:
#define user_mode(regs) (((regs)->ps & 8) != 0)
--Jay++
-----------------------------------------------------------------------------
Jay A Estabrook Alpha Engineering - LINUX Project
Compaq Computer Corp. - MRO1-2/K20 (508) 467-2080
200 Forest Street, Marlboro, MA 01752 Jay.Estabrook@compaq.com
-----------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: process time accounting
1999-10-19 17:24 ` Jay.Estabrook
@ 1999-10-19 16:50 ` Lars Hjorth
0 siblings, 0 replies; 9+ messages in thread
From: Lars Hjorth @ 1999-10-19 16:50 UTC (permalink / raw)
To: axp-list
On Tue, 19 Oct 1999 Jay.Estabrook@digital.com wrote:
>
> >>> Lars Hjorth said:
> >
> > I have noticed a problem where the statistics about cpu-usage for the
> > processes are invalid on my Compaq DS20 machine with Linux 2.2.9 SMP. The
> > statistics will only take time used on the first processor but not on the
> > second. Am I the only one to experience this?
>
> No, which is why its fixed in later sources... ;-}
I thought I had the latest. Ops. I am actually running 2.2.12.
>
> Patch it by changing the appropriate line in include/asm-alpha/ptrace.h to:
>
> #define user_mode(regs) (((regs)->ps & 8) != 0)
This is exactly what's in my file :-(
/Lars
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: process time accounting
1999-10-19 16:11 process time accounting Lars Hjorth
1999-10-19 17:24 ` Jay.Estabrook
@ 1999-10-19 17:52 ` Jay.Estabrook
1999-10-19 18:03 ` xosview Todd Henderson
1999-10-20 10:35 ` process time accounting Lars Hjorth
1 sibling, 2 replies; 9+ messages in thread
From: Jay.Estabrook @ 1999-10-19 17:52 UTC (permalink / raw)
To: axp-list
>>> Lars Hjorth said:
>
> I have noticed a problem where the statistics about cpu-usage for the
> processes are invalid on my Compaq DS20 machine with Linux 2.2.9 SMP. The
> statistics will only take time used on the first processor but not on the
> second. Am I the only one to experience this?
>
> Quick test: Make sure both CPU's have been working. Do cat /proc/stats.
> This gives a printout that looks something like:
> cpu 2718 0 8127 5046643
> cpu0 2718 0 8127 2517899
> cpu1 0 0 0 2528744
I see the following under 2.2.13-pre15 (plus a bunch of patches, but I don't
think there's anything in the patches that affect this area):
cpu 1826350 1529 158392 6428081
cpu0 743001 1189 76139 3386847
cpu1 1083524 340 83107 3040205
Do you ever see anything running on the second CPU when you run "xosview"?
What does /proc/cpuinfo show?
--Jay++
-----------------------------------------------------------------------------
Jay A Estabrook Alpha Engineering - LINUX Project
Compaq Computer Corp. - MRO1-2/K20 (508) 467-2080
200 Forest Street, Marlboro, MA 01752 Jay.Estabrook@compaq.com
-----------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* xosview
1999-10-19 17:52 ` Jay.Estabrook
@ 1999-10-19 18:03 ` Todd Henderson
1999-10-19 19:04 ` xosview Jay.Estabrook
1999-10-20 10:35 ` process time accounting Lars Hjorth
1 sibling, 1 reply; 9+ messages in thread
From: Todd Henderson @ 1999-10-19 18:03 UTC (permalink / raw)
To: axp-list
Is xosview on the Redhat CD? Or is it downloadable from somewhere for the
Alpha?
Thanks,
Todd
Jay.Estabrook@digital.com wrote:
>
>
> Do you ever see anything running on the second CPU when you run "xosview"?
>
> What does /proc/cpuinfo show?
>
> --Jay++
>
> -----------------------------------------------------------------------------
> Jay A Estabrook Alpha Engineering - LINUX Project
> Compaq Computer Corp. - MRO1-2/K20 (508) 467-2080
> 200 Forest Street, Marlboro, MA 01752 Jay.Estabrook@compaq.com
> -----------------------------------------------------------------------------
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: xosview
1999-10-19 18:03 ` xosview Todd Henderson
@ 1999-10-19 19:04 ` Jay.Estabrook
0 siblings, 0 replies; 9+ messages in thread
From: Jay.Estabrook @ 1999-10-19 19:04 UTC (permalink / raw)
To: axp-list
>>> Todd Henderson said:
>
> Is xosview on the Redhat CD? Or is it downloadable from somewhere for the
> Alpha?
AFAIK, it came standard with 5.2 and 6.0, but it may not be in anything but
an "Everything" install...
--Jay++
-----------------------------------------------------------------------------
Jay A Estabrook Alpha Engineering - LINUX Project
Compaq Computer Corp. - MRO1-2/K20 (508) 467-2080
200 Forest Street, Marlboro, MA 01752 Jay.Estabrook@compaq.com
-----------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: process time accounting
1999-10-19 17:52 ` Jay.Estabrook
1999-10-19 18:03 ` xosview Todd Henderson
@ 1999-10-20 10:35 ` Lars Hjorth
1999-10-21 21:47 ` Jay.Estabrook
1 sibling, 1 reply; 9+ messages in thread
From: Lars Hjorth @ 1999-10-20 10:35 UTC (permalink / raw)
To: axp-list
On Tue, 19 Oct 1999 Jay.Estabrook@digital.com wrote:
>
> I see the following under 2.2.13-pre15 (plus a bunch of patches, but I don't
> think there's anything in the patches that affect this area):
>
> cpu 1826350 1529 158392 6428081
> cpu0 743001 1189 76139 3386847
> cpu1 1083524 340 83107 3040205
Is this on a DS20 machine or some other hardware?
>
> Do you ever see anything running on the second CPU when you run "xosview"?
No, which is hardly surprising since I assume xosview takes its
information from /proc/stat?
>
> What does /proc/cpuinfo show?
.
platform string : AlphaServer DS20 500 MHz
cpus detected : 2
CPUs probed 2 active 2 map 0x3 IPIs 17343
.
I am sure both processors are being used since a program with lots of cpu
operations produce outputs without getting increased cpu time in the
statistics.
Should I go and get the 2.2.13-pre?
/Lars
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: process time accounting
1999-10-20 10:35 ` process time accounting Lars Hjorth
@ 1999-10-21 21:47 ` Jay.Estabrook
1999-10-22 8:21 ` Lars Hjorth
0 siblings, 1 reply; 9+ messages in thread
From: Jay.Estabrook @ 1999-10-21 21:47 UTC (permalink / raw)
To: axp-list
>>> Lars Hjorth said:
>
> On Tue, 19 Oct 1999 Jay.Estabrook@digital.com wrote:
>
> >
> > I see the following under 2.2.13-pre15 (plus a bunch of patches, but I don't
> > think there's anything in the patches that affect this area):
> >
> > cpu 1826350 1529 158392 6428081
> > cpu0 743001 1189 76139 3386847
> > cpu1 1083524 340 83107 3040205
>
> Is this on a DS20 machine or some other hardware?
Yes, DS20.
> > What does /proc/cpuinfo show?
>
> .
> platform string : AlphaServer DS20 500 MHz
> cpus detected : 2
> CPUs probed 2 active 2 map 0x3 IPIs 17343.
Definitely running SMP.
> I am sure both processors are being used since a program with lots of cpu
> operations produce outputs without getting increased cpu time in the
> statistics.
>
> Should I go and get the 2.2.13-pre?
I don't know if that will fix it, but its worth a try...
--Jay++
---------------------------------------------------------------
Jay A Estabrook Alpha Engineering - LINUX
Compaq Computer Corp. - MRO1-2/K20 (508) 467-2080
200 Forest Street, Marlboro MA 01752 Jay.Estabrook@compaq.com
---------------------------------------------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: process time accounting
1999-10-21 21:47 ` Jay.Estabrook
@ 1999-10-22 8:21 ` Lars Hjorth
0 siblings, 0 replies; 9+ messages in thread
From: Lars Hjorth @ 1999-10-22 8:21 UTC (permalink / raw)
To: axp-list
> > Is this on a DS20 machine or some other hardware?
>
> Yes, DS20.
Hm. Now I'm confused.
>
> > > What does /proc/cpuinfo show?
> >
> > .
> > platform string : AlphaServer DS20 500 MHz
> > cpus detected : 2
> > CPUs probed 2 active 2 map 0x3 IPIs 17343.
>
> Definitely running SMP.
>
> > I am sure both processors are being used since a program with lots of cpu
> > operations produce outputs without getting increased cpu time in the
> > statistics.
> >
> > Should I go and get the 2.2.13-pre?
>
> I don't know if that will fix it, but its worth a try...
Have tried the just released 2.2.13. Didn't work. :-(
Now what
/Lars
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~1999-10-22 8:24 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-10-19 16:11 process time accounting Lars Hjorth
1999-10-19 17:24 ` Jay.Estabrook
1999-10-19 16:50 ` Lars Hjorth
1999-10-19 17:52 ` Jay.Estabrook
1999-10-19 18:03 ` xosview Todd Henderson
1999-10-19 19:04 ` xosview Jay.Estabrook
1999-10-20 10:35 ` process time accounting Lars Hjorth
1999-10-21 21:47 ` Jay.Estabrook
1999-10-22 8:21 ` Lars Hjorth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox