Re: [sshmenu] SSHMenu powertop report
Brought to you by:
grantm
From: Grant M. <gr...@mc...> - 2007-10-11 20:19:31
|
On Thu, 2007-10-11 at 20:00 +0200, Ori Avtalion wrote: > Hi, > > I ran powertop on my machine, and discovered that SSHMenu 3.14 causes > lots of processor wakeups when it's idle. > > ( 62.5) sshmenu-applet : do_nanosleep (hrtimer_wakeup) > > Any idea what causes it? One of my colleagues was trying out PowerTop and saw the same thing. It seems to be an issue with any Ruby/Gtk program. I made a test program that used no SSHMenu code and simply displayed one button I was surprised to see it was bouncing in and out of the select() system call even without user interaction. I sent this message to the ruby-gnome2 list: http://www.ruby-forum.com/topic/126172 The upshot seems to be that the Ruby/Gtk bindings work this way to support Ruby threading - i.e. if the main Ruby thread blocked in the Gtk event loop's select() then other threads would never get a chance to run. SSHMenu doesn't explicitly use threading but there's no way to tell the bindings that it's safe to block in the event loop. The discussion in the thread linked above does suggest it could be fixed in the bindings but there's no short-term fix. Regards Grant |