bugtpb -- ThinkPad Buttons - Bugs: bug #9230, TPB uses too much CPU

 
 

bug #9230: TPB uses too much CPU

Submitter:  None
Submitted:  Sat 05 Jun 2004 06:24:16 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  mbr
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 23 Aug 2004 12:53:51 PM UTC, comment #5: 

Fixed in release 0.6.3

Markus Braun <mbr>
Group administrator
Wed 18 Aug 2004 02:46:29 PM UTC, comment #4: 

I changed the default poll time to 200ms and also open the nvram device once. Now, according to my measurements tpb doesn't produce measurable CPU load.
Are you willing to test this version? If so, please contact me via mail, I can sen you the source or a Debian unstable package.

Markus Braun <mbr>
Group administrator
Mon 16 Aug 2004 11:51:21 PM UTC, comment #3: 

I noticed the same problem.  I do not have APM polling enabled, and I can verify with strace that all tpb does when it wakes up is open /dev/nvram and read 114 bytes.  tpb usually does not show up on top (occasionally at a fraction of a percent), but it still has a major effect:  A simple counter loop completes in 2.03 s without tpb, and 2.34 s with.  Obviously, this is unacceptible, and IMO 1 ms is an insane polling rate.  100 ms brings the difference on my loop down to <1%, but still detectible.  It would be nice if it were in the noise.

My computer is a Thinkpad X40.  I am using 0.6.2-1 from Debian unstable.  I assume this doesn't have the optimization you mentioned in this bug.  Also, can you keep the file open instead of opening it every poll?

Andrew Pimlott <pimlott>
Thu 22 Jul 2004 02:59:06 PM UTC, comment #2: 

Even if I got no response I worked on this issue :))
I reduced the number of bytes read from nvram each poll interval. The CPU usage droped to nearly zero.

If you are still interested, please send me a mail so you can check this version on your laptop.

Markus Braun <mbr>
Group administrator
Mon 07 Jun 2004 12:32:01 PM UTC, comment #1: 

Have you tried to disable APM polling? In some cases APM polling generates the CPU load you described. Please specify the following option on the command line

  --apm=off

or disable APM in the configuration file

  APM OFF

Does this fix the problem?

Markus Braun <mbr>
Group administrator
Sat 05 Jun 2004 06:24:16 PM UTC, original submission:  

TPB generally uses 2-5% of my 1.8Ghz CPU. I'd like this to be reduced to 0%, possibly by polling less frequently or in a less computationally expensive manner.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-08-23 mbr StatusNone Fixed
2004-06-07 mbr Assigned toNone mbr

Back to the top

Powered by Savane 3.13-cf05.
Corresponding source code