Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: Identifying CPUs in the kernel
Date: Sat, 23 Jun 2007 10:05:05
Message-Id: pan.2007.06.23.09.52.32@cox.net
In Reply to: Re: [gentoo-amd64] Re: Identifying CPUs in the kernel by Peter Humphrey
1 Peter Humphrey <prh@××××××××××.uk> posted
2 200706230916.07711.prh@××××××××××.uk, excerpted below, on Sat, 23 Jun
3 2007 09:16:07 +0100:
4
5 > Here's what top showed then. Look at the /nice/ values on lines 3 and 4,
6 > and compare those with the %CPU and Processor fields of processes 5279
7 > and 5280 (sorry about the line wraps). This has me deeply puzzled:
8
9 Fixed the line wraps and removed a bit of extraneous information. =8^)
10
11 > top - 09:04:59 up 23 min, 5 users, load average: 3.60, 4.79, 3.91
12 > Tasks: 124 total, 2 running, 122 sleeping, 0 stopped, 0 zombie
13
14 > Cpu0: 0.3%us, 0.3%sy, 0.0%ni, 99.3%id, [zeroes]
15 > Cpu1: 0.0%us, 0.3%sy, 99.7%ni, 0.0%id, [zeroes]
16
17 > PID USER PR NI S %CPU %MEM TIME+ P COMMAND
18 > 5279 prh 34 19 S 50 1.0 6:53.97 1 setiathome-5.12
19 > 5280 prh 34 19 S 50 1.0 6:54.08 0 setiathome-5.12
20
21
22 > I don't think this is a scheduling problem; it goes deeper, so that the
23 > kernel doesn't have a consistent picture of which processor is which.
24
25 Critical question here, is that in SMP Irix or SMP Solaris mode? (See
26 the top manpage if you don't know what I mean.) Asked another way, is
27 that displaying percent of total CPU time (both CPUs) or percent of
28 total divided by number of CPUs (so percent of one CPU)?
29
30 If it's Irix mode (percent total CPU time), then it's reporting full
31 usage of both CPUs, one on each. The CPU0 line would then be the one
32 screwed up, since it's reporting idle when it clearly has to be in use.
33
34 If it's Solaris mode (percent of a single CPU's time, so total of all
35 percentages should be 200% if you have two CPUs), then the CPUs
36 lines would seem to be correct, both processes would appear to be
37 running on CPU1, maxing it out, and the P column of the 5280 line
38 would have to be screwed up. (That's assuming you let the figures
39 stabilize after the last schedtool call you made.)
40
41 In either case, I'm not sure where your bug is, but you are correct,
42 the problem appears to be way deeper than scheduling. I'd guess it's
43 ultimately a kernel bug, possibly due to a hardware bug, possibly not,
44 but you might wish to file it on top initially, just to see if they've
45 seen similar and can tell you what's going on. Unless you want to
46 double-check patching status yourself, you might as well file the bug
47 with Gentoo first, in case it's a Gentoo bug. They'll probably end
48 up closing it "upstream", but at least then when you file it upstream,
49 you can say you've cleared it with Gentoo first.
50
51 As for top, note that there's a trick you can use with it. You'll
52 likely want to trim the memory columns etc as I did for your bug
53 report, but you may not want to mess up your regular config to do
54 so. Not a problem! =8^) Create a symlink to top called something
55 else (say topbug). Then run it using the symlink, and you can change
56 and save your setttings, and it'll save them in a different rc file
57 (topbugrc using my example). That way, you can run it with the bug
58 report settings when you want to, without messing up your regular
59 config.
60
61 Of course, don't forget to mention in your bug report whether you were
62 in Solaris or Irix SMP mode, because as I explained, it /does/ make a
63 difference.
64
65 Let me know how this goes, post the bug number when you file it or
66 whatever, as I'd like to follow it too. You definitely have a
67 strange one here, and I'd /love/ to see what the real experts have
68 to say about it! You are absolutely correct, it doesn't seem to
69 make any sense at all!
70
71 Good luck. That's one /strange/ problem you have going there!
72 No /wonder/ you were expressing frustration earlier!
73
74 --
75 Duncan - List replies preferred. No HTML msgs.
76 "Every nonfree program has a lord, a master --
77 and if you use the program, he is your master." Richard Stallman
78
79 --
80 gentoo-amd64@g.o mailing list

Replies

Subject Author
Re: [gentoo-amd64] Re: Identifying CPUs in the kernel Peter Humphrey <prh@××××××××××.uk>
Re: [gentoo-amd64] Re: Identifying CPUs in the kernel Peter Humphrey <prh@××××××××××.uk>