From kde-devel Thu May 31 20:24:29 2001 From: Gioele Barabucci Date: Thu, 31 May 2001 20:24:29 +0000 To: kde-devel Subject: Fwd: kmix constantly burnin' CPU X-MARC-Message: https://marc.info/?l=kde-devel&m=99133923706647 Maybe it can interest someone ---------- Forwarded Message ---------- Subject: kmix constantly burnin' CPU Date: Thu, 31 May 2001 08:04:34 -0700 From: LA Walsh To: KDE User List When ever I start, 'kmix' is running. I often kill it because it it is constantly running and using about 2% of my CPU -- even if everything else is idle. This is wrong, especially on a laptop where this may be contributing as much as a 5% extra drain on my battery for no good reason= =2E In doing a strace of it, you can see its doing some sort of busy looping in the absence of any work to do rather than being event driven. (output at end of note). Note that the select timeout is approximately .196 seconds (196ms) follow= ed by 10 calls to getimeofday at 4ms intervals, summing approximately .2 seconds. Every third .2 second interval, 16 ioctls are made to get statu= s.=20 Here is seems like it'd be real useful to ask the owner of the SOUND_MIX= ER device for 1 ioctl that returns all of the information requested in 1 sy= stem call. This averages to about 70 system calls per second. Additionally, ltrace reveals additionally approximately 1008 library calls per second. I'd include output, but it's *very* long. This is a large amount CPU burnt doing 'nothing'. Given, for example, th= at the system wait parameter before it calls the system power-idle is 300ms = of 'idle', that means it will never get called. It also means I'm losing much system cache benefits/instruction prefetch when executing any other CPU intensive operation. (Also reported as a bug)... select(8, [3 4 5 7], NULL, NULL, {0, 195592}) =3D 0 (Timeout) gettimeofday({991319205, 970457}, NULL) =3D 0 gettimeofday({991319205, 970848}, NULL) =3D 0 gettimeofday({991319205, 971203}, NULL) =3D 0 gettimeofday({991319205, 971557}, NULL) =3D 0 gettimeofday({991319205, 971912}, NULL) =3D 0 gettimeofday({991319205, 972266}, NULL) =3D 0 gettimeofday({991319205, 972621}, NULL) =3D 0 gettimeofday({991319205, 972975}, NULL) =3D 0 gettimeofday({991319205, 973328}, NULL) =3D 0 gettimeofday({991319205, 973682}, NULL) =3D 0 ioctl(4, FIONREAD, [0]) =3D 0 gettimeofday({991319205, 974370}, NULL) =3D 0 select(8, [3 4 5 7], NULL, NULL, {0, 195665}) =3D 0 (Timeout) gettimeofday({991319206, 170490}, NULL) =3D 0 gettimeofday({991319206, 170885}, NULL) =3D 0 gettimeofday({991319206, 171241}, NULL) =3D 0 gettimeofday({991319206, 171597}, NULL) =3D 0 gettimeofday({991319206, 171951}, NULL) =3D 0 gettimeofday({991319206, 172306}, NULL) =3D 0 gettimeofday({991319206, 172661}, NULL) =3D 0 gettimeofday({991319206, 173016}, NULL) =3D 0 gettimeofday({991319206, 173370}, NU.LL) =3D 0 gettimeofday({991319206, 173726}, NULL) =3D 0 ioctl(8, SOUND_MIXER_READ_VOLUME, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_PCM, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_SPEAKER, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_LINE, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_MIC, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_CD, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_IGAIN, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_LINE1, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) =3D 0 ioctl(8, 0x80044d16, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) =3D 0 ioctl(4, FIONREAD, [0]) =3D 0 gettimeofday({991319206, 198563}, NULL) =3D 0 select(8, [3 4 5 7], NULL, NULL, {0, 171472}) =3D 0 (Timeout) gettimeofday({991319206, 370498}, NULL) =3D 0 gettimeofday({991319206, 370894}, NULL) =3D 0 gettimeofday({991319206, 371252}, NULL) =3D 0 gettimeofday({991319206, 371606}, NULL) =3D 0 gettimeofday({991319206, 371961}, NULL) =3D 0 gettimeofday({991319206, 372317}, NULL) =3D 0 gettimeofday({991319206, 372671}, NULL) =3D 0 gettimeofday({991319206, 373025}, NULL) =3D 0 gettimeofday({991319206, 373380}, NULL) =3D 0 gettimeofday({991319206, 373735}, NULL) =3D 0 ioctl(4, FIONREAD, [0]) =3D 0 gettimeofday({991319206, 374424}, NULL) =3D 0 select(8, [3 4 5 7], NULL, NULL, {0, 195611}) =3D 0 (Timeout) gettimeofday({991319206, 570486}, NULL) =3D 0 gettimeofday({991319206, 570924}, NULL) =3D 0 gettimeofday({991319206, 571286}, NULL) =3D 0 gettimeofday({991319206, 571645}, NULL) =3D 0 gettimeofday({991319206, 572004}, NULL) =3D 0 gettimeofday({991319206, 572363}, NULL) =3D 0 gettimeofday({991319206, 572723}, NULL) =3D 0 gettimeofday({991319206, 573082}, NULL) =3D 0 gettimeofday({991319206, 573439}, NULL) =3D 0 gettimeofday({991319206, 573796}, NULL) =3D 0 ioctl(4, FIONREAD, [0]) =3D 0 gettimeofday({991319206, 574493}, NULL) =3D 0 select(8, [3 4 5 7], NULL, NULL, {0, 95718}) =3D 0 (Timeout) gettimeofday({991319206, 670484}, NULL) =3D 0 ioctl(8, SOUND_MIXER_READ_VOLUME, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_PCM, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_SPEAKER, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_LINE, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_MIC, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_CD, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_IGAIN, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_LINE1, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) =3D 0 ioctl(8, 0x80044d16, 0xbfffecb0) =3D 0 ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) =3D 0 gettimeofday({991319206, 695033}, NULL) =3D 0 ioctl(4, FIONREAD, [0]) =3D 0 gettimeofday({991319206, 695724}, NULL) =3D 0 select(8, [3 4 5 7], NULL, NULL, {0, 74311}) =3D 0 (Timeout) gettimeofday({991319206, 770487}, NULL) =3D 0 gettimeofday({991319206, 770882}, NULL) =3D 0 gettimeofday({991319206, 771242}, NULL) =3D 0 gettimeofday({991319206, 771600}, NULL) =3D 0 gettimeofday({991319206, 771958}, NULL) =3D 0 gettimeofday({991319206, 772316}, NULL) =3D 0 gettimeofday({991319206, 772674}, NULL) =3D 0 gettimeofday({991319206, 773032}, NULL) =3D 0 gettimeofday({991319206, 773390}, NULL) =3D 0 gettimeofday({991319206, 773748}, NULL) =3D 0 ioctl(4, FIONREAD, [0]) =3D 0 gettimeofday({991319206, 774494}, NULL) =3D 0 -- The above thoughts and | They may have nothing to do with writings are my own. | the opinions of my employer. :-) L A Walsh | Trust Technology, Core Linux, SGI law@sgi.com | Voice: (650) 933-5338 -- Send posts to: kde-user@lists.netcentral.net Send all commands to: kde-user-request@lists.netcentral.net Put your command in the SUBJECT of the message: "subscribe", "unsubscribe", "set digest on", or "set digest off" All kde mailing lists are archived at http://lists.kde.org ********************************************************************** This list is from your pals at NetCentral ------------------------------------------------------- >> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<