strk wrote:
> On Tue, Jun 02, 2009 at 12:28:06PM -0700, John Gilmore wrote:
>> When I pause the video, it goes up to about 400 wakeups/sec (140 from
>> schedule_hrtimeout_range from gnash, and 120 from do_nanosleep from
>> gnash).  
> I don't think gnash is calling those two functions directly, must
> be some dependent library.
Of cause, that's kernel functions, they cannot be called directly by
userspace at all.
It caused by userspace using too short delays in nanosleep/usleep/
select/poll/setitimer/...
Fragment of strace paused gtk-gnash/agg 0.8.5 with "set delay 50":
ioctl(3, FIONREAD, [0])                 = 0
gettimeofday({1244200744, 140595}, NULL) = 0
poll([{fd=3, events=POLLIN}], 1, 49)    = 0
gettimeofday({1244200744, 196519}, NULL) = 0
ioctl(3, FIONREAD, [0])                 = 0
Fragment of strace paused gtk-gnash/agg 0.8.5 with commented "set delay":
gettimeofday({1244200978, 360721}, NULL) = 0
poll([{fd=3, events=POLLIN}], 1, 9)     = 0
gettimeofday({1244200978, 376522}, NULL) = 0
ioctl(3, FIONREAD, [0])                 = 0
This is not right at all. Unless you have running timer (and no timer
run in paused mode), you should not set timeout in poll() at all
(something like poll(nfd, fds, -1)); or, at least, set it way higher.
See also http://www.lesswatts.org/projects/applications-power-management/



_______________________________________________
Gnash-dev mailing list
Gnash-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnash-dev

Reply via email to