* Re: 2.4 Cpu usuage (display oddities more than anything) [not found] <3A7381C2.C512B76C@sgi.com> @ 2001-01-28 2:23 ` Linda Walsh 2001-01-28 14:07 ` safemode 2001-01-29 0:02 ` Pavel Machek 0 siblings, 2 replies; 3+ messages in thread From: Linda Walsh @ 2001-01-28 2:23 UTC (permalink / raw) To: linux-kernel Some oddities w/kapmd(2.4.0)... If I sit in X and do nothing other than run top or "vmstat 5", I get down to as low as 60% idle and 40% in system -- with kapmd getting 'charged' for the 40%. Then I go and run 'freeamp' and the CPU usage goes to 100% idle, presumably because kapmd never gets called because it's never in the idle loop for longer than 333ms. It's just weird and unnatural. Also forgive my ignorance but is it really possible playing VBR MP3's takes 0 measurable CPU? I've run the program for hours and a ps of 'freeamp' show either no measured cpu time or maybe 1 second...the kernel runs at at 100% idle for most of the time. I thought mp3 decompression was a cpu intensive operation....weird... I guess I'm thinking -- maybe time in kapmd should be counted as 'idle'? -l - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 2.4 Cpu usuage (display oddities more than anything) 2001-01-28 2:23 ` 2.4 Cpu usuage (display oddities more than anything) Linda Walsh @ 2001-01-28 14:07 ` safemode 2001-01-29 0:02 ` Pavel Machek 1 sibling, 0 replies; 3+ messages in thread From: safemode @ 2001-01-28 14:07 UTC (permalink / raw) To: Linda Walsh; +Cc: linux-kernel Linda Walsh wrote: > Some oddities w/kapmd(2.4.0)... If I sit in X and do nothing other than run top or > "vmstat 5", I get down to as low as 60% idle and 40% in system -- with kapmd getting > 'charged' for the 40%. > > Then I go and run 'freeamp' and the CPU usage goes to 100% idle, presumably because > kapmd never gets called because it's never in the idle loop for longer than 333ms. > > It's just weird and unnatural. > > Also forgive my ignorance but is it really possible playing VBR MP3's takes 0 measurable > CPU? I've run the program for hours and a ps of 'freeamp' show either no measured cpu > time or maybe 1 second...the kernel runs at at 100% idle for most of the time. > I thought mp3 decompression was a cpu intensive operation....weird... > > I guess I'm thinking -- maybe time in kapmd should be counted as 'idle'? > freeamp is just that good. I've seen 0% cpu usage with it on 2.4 and 2.2. if you notice closely, it does use a percentage of cpu but it's so small that over the course of time that the cpu usage of each process is averaged, it is closer to 0 than 1. It is hands down the best mp3 player i've seen out. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 2.4 Cpu usuage (display oddities more than anything) 2001-01-28 2:23 ` 2.4 Cpu usuage (display oddities more than anything) Linda Walsh 2001-01-28 14:07 ` safemode @ 2001-01-29 0:02 ` Pavel Machek 1 sibling, 0 replies; 3+ messages in thread From: Pavel Machek @ 2001-01-29 0:02 UTC (permalink / raw) To: Linda Walsh, linux-kernel Hi! > Some oddities w/kapmd(2.4.0)... If I sit in X and do nothing other than run top or > "vmstat 5", I get down to as low as 60% idle and 40% in system -- with kapmd getting > 'charged' for the 40%. At least you can see how kapmd mechanism actually works. > Then I go and run 'freeamp' and the CPU usage goes to 100% idle, presumably because > kapmd never gets called because it's never in the idle loop for longer than 333ms. > > It's just weird and unnatural. > > Also forgive my ignorance but is it really possible playing VBR MP3's takes 0 measurable > CPU? I've run the program for hours and a ps of 'freeamp' show either no measured cpu > time or maybe 1 second...the kernel runs at at 100% idle for most of the time. > I thought mp3 decompression was a cpu intensive > operation....weird... Those counters are running. Try this one: /* * This is simple program which should show weak spots in linux's scheduler */ #include <stdio.h> #include <time.h> #include <sys/timeb.h> #include <unistd.h> int startgame; int ticks( void ) { struct timeb tb; int sec, msec; ftime( &tb ); sec = tb.time - startgame; msec = tb.millitm; return sec * 1000 + msec; } void main( int argc, char *argv[] ) { int delta, badboy = 0, count = 1000000; int t1, t2; startgame = time(NULL); if (argc>1) { badboy = 1; printf( "I'm a *BAD* boy! " ); usleep( 100000 ); t1 = ticks(); usleep( 100000 ); t2 = ticks(); delta = t2-t1; printf( "And bad boys know that jiffie is %dmsec\n", delta ); delta = 10; } else { printf( "I'm a good boy.\n" ); delta = 20; } while(1) { if ((ticks()-t1) % delta > ((delta * 17)/20)) if (badboy) usleep(10000); if (!((--count)%100000)) { printf( "." ); fflush( stdout ); } if (!count) break; } } it used to work. Bad boy used to be charged 0% cpu even if it ate 70% > I guess I'm thinking -- maybe time in kapmd should be counted as 'idle'? -- I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care." Panos Katsaloulis describing me w.r.t. patents at discuss@linmodems.org - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-01-29 14:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <3A7381C2.C512B76C@sgi.com>
2001-01-28 2:23 ` 2.4 Cpu usuage (display oddities more than anything) Linda Walsh
2001-01-28 14:07 ` safemode
2001-01-29 0:02 ` Pavel Machek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox