[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Fwd: kmix constantly burnin' CPU
From:       Gioele Barabucci <dev () gioelebarabucci ! com>
Date:       2001-05-31 20:24:29
[Download RAW message or body]


Maybe it can interest someone

----------  Forwarded Message  ----------
Subject: kmix constantly burnin' CPU
Date: Thu, 31 May 2001 08:04:34 -0700
From: LA Walsh <law@sgi.com>
To: KDE User List <kde-user@lists.netcentral.net>


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.

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) followed
 by 10 calls to getimeofday at 4ms intervals, summing approximately .2
 seconds. Every third .2 second interval, 16 ioctls are made to get status. 
 Here is seems like it'd be real useful to ask the owner of the SOUND_MIXER
 device for 1 ioctl that returns all of the information requested in 1 system
 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, that
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}) = 0 (Timeout)
gettimeofday({991319205, 970457}, NULL) = 0
gettimeofday({991319205, 970848}, NULL) = 0
gettimeofday({991319205, 971203}, NULL) = 0
gettimeofday({991319205, 971557}, NULL) = 0
gettimeofday({991319205, 971912}, NULL) = 0
gettimeofday({991319205, 972266}, NULL) = 0
gettimeofday({991319205, 972621}, NULL) = 0
gettimeofday({991319205, 972975}, NULL) = 0
gettimeofday({991319205, 973328}, NULL) = 0
gettimeofday({991319205, 973682}, NULL) = 0
ioctl(4, FIONREAD, [0])                 = 0
gettimeofday({991319205, 974370}, NULL) = 0
select(8, [3 4 5 7], NULL, NULL, {0, 195665}) = 0 (Timeout)
gettimeofday({991319206, 170490}, NULL) = 0
gettimeofday({991319206, 170885}, NULL) = 0
gettimeofday({991319206, 171241}, NULL) = 0
gettimeofday({991319206, 171597}, NULL) = 0
gettimeofday({991319206, 171951}, NULL) = 0
gettimeofday({991319206, 172306}, NULL) = 0
gettimeofday({991319206, 172661}, NULL) = 0
gettimeofday({991319206, 173016}, NULL) = 0
gettimeofday({991319206, 173370}, NU.LL) = 0
gettimeofday({991319206, 173726}, NULL) = 0
ioctl(8, SOUND_MIXER_READ_VOLUME, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_PCM, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_SPEAKER, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_LINE, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_MIC, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_CD, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_IGAIN, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_LINE1, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) = 0
ioctl(8, 0x80044d16, 0xbfffecb0)        = 0
ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) = 0
ioctl(4, FIONREAD, [0])                 = 0
gettimeofday({991319206, 198563}, NULL) = 0
select(8, [3 4 5 7], NULL, NULL, {0, 171472}) = 0 (Timeout)
gettimeofday({991319206, 370498}, NULL) = 0
gettimeofday({991319206, 370894}, NULL) = 0
gettimeofday({991319206, 371252}, NULL) = 0
gettimeofday({991319206, 371606}, NULL) = 0
gettimeofday({991319206, 371961}, NULL) = 0
gettimeofday({991319206, 372317}, NULL) = 0
gettimeofday({991319206, 372671}, NULL) = 0
gettimeofday({991319206, 373025}, NULL) = 0
gettimeofday({991319206, 373380}, NULL) = 0
gettimeofday({991319206, 373735}, NULL) = 0
ioctl(4, FIONREAD, [0])                 = 0
gettimeofday({991319206, 374424}, NULL) = 0
select(8, [3 4 5 7], NULL, NULL, {0, 195611}) = 0 (Timeout)
gettimeofday({991319206, 570486}, NULL) = 0
gettimeofday({991319206, 570924}, NULL) = 0
gettimeofday({991319206, 571286}, NULL) = 0
gettimeofday({991319206, 571645}, NULL) = 0
gettimeofday({991319206, 572004}, NULL) = 0
gettimeofday({991319206, 572363}, NULL) = 0
gettimeofday({991319206, 572723}, NULL) = 0
gettimeofday({991319206, 573082}, NULL) = 0
gettimeofday({991319206, 573439}, NULL) = 0
gettimeofday({991319206, 573796}, NULL) = 0
ioctl(4, FIONREAD, [0])                 = 0
gettimeofday({991319206, 574493}, NULL) = 0
select(8, [3 4 5 7], NULL, NULL, {0, 95718}) = 0 (Timeout)
gettimeofday({991319206, 670484}, NULL) = 0
ioctl(8, SOUND_MIXER_READ_VOLUME, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_PCM, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_SPEAKER, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_LINE, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_MIC, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_CD, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_IGAIN, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_LINE1, 0xbfffecb0) = 0
ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) = 0
ioctl(8, 0x80044d16, 0xbfffecb0)        = 0
ioctl(8, SOUND_MIXER_READ_RECSRC, 0xbfffecb0) = 0
gettimeofday({991319206, 695033}, NULL) = 0
ioctl(4, FIONREAD, [0])                 = 0
gettimeofday({991319206, 695724}, NULL) = 0
select(8, [3 4 5 7], NULL, NULL, {0, 74311}) = 0 (Timeout)
gettimeofday({991319206, 770487}, NULL) = 0
gettimeofday({991319206, 770882}, NULL) = 0
gettimeofday({991319206, 771242}, NULL) = 0
gettimeofday({991319206, 771600}, NULL) = 0
gettimeofday({991319206, 771958}, NULL) = 0
gettimeofday({991319206, 772316}, NULL) = 0
gettimeofday({991319206, 772674}, NULL) = 0
gettimeofday({991319206, 773032}, NULL) = 0
gettimeofday({991319206, 773390}, NULL) = 0
gettimeofday({991319206, 773748}, NULL) = 0
ioctl(4, FIONREAD, [0])                 = 0
gettimeofday({991319206, 774494}, NULL) = 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 <http://www.netcentral.com/>

-------------------------------------------------------

>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic