
On Sat, Jul 09, 2005 at 12:28:43AM +0200, "David Hücking" wrote:
/var/log/messages: Jul 2 02:31:40 bree [powersave][10245]: WARNING in Function start; line 371: Select returned an Error, but not interrupted through a signal: Invalid argument This is not nice, but normal after a suspend2disk Jul 2 02:32:10 bree last message repeated 1006775 times
Das ist der dazugehörige Code: req.tv_sec = config->current_scheme->POLL_INTERVAL / 1000; req.tv_usec = config->current_scheme->POLL_INTERVAL * 1000 % 1000000; gettimeofday(&tv_start, &dummy); for (;;){ do{ temp_fd_set=fd_set_reading; // if no cpufreq and no battery is supported do not poll at all! if (cur_state.BAT_STATE == BAT_NONE_STATE && !CPUFreq_Interface::isSupported() && !acpidDied){ pDebug(DBG_DEBUG, "Select waiting without timeout, polling disabled.\n" "No battery and no cpufreq have been detected.\n"); ret = select (max_FD_value+1, &temp_fd_set, NULL, NULL, NULL); } else{ pDebug(DBG_DEBUG, "Select waiting: %u secs and %u millisecs\n", (unsigned)req.tv_sec, (unsigned)req.tv_usec / 1000); ret = select (max_FD_value+1, &temp_fd_set, NULL, NULL, &req); } if (ret < 0){ if (errno == EINTR){ pDebug(DBG_DEBUG, "Select returned with EINTR, continue\n"); continue; } // be careful after suspend select may return x < 0, but errno is not set! // for now I ignore the set file descriptor(for not waiting endlessly on socket // and continue. Maybe we should try a poll implementation here later... else{ pDebug(DBG_WARN, "Select returned an Error, " "but not interrupted through a signal: %s" " This is not nice, but normal after a suspend2disk\n", strerror(errno)); Das einzige was mir dazu einfallen würde, warum select hier ein "invalid argument" liefern sollte, wäre ein verwirrter Timeout. Was steht denn in POWERSAVED_POLLING_INTERVAL in /etc/sysconfig/powersave/common? Ansonsten starte den powersaved mal mit dem höchsten debuglevel (31), am besten manuell: rcpowersaved stop /usr/sbin/powersaved -x /usr/lib/powersave/scripts -a resmgr -v 31 (nach ein paar sekunden schnell strg-c drücken) danach mal schauen, in welchem select-zweig er war ("Select waiting without timeout" oder "Select waiting: xxx secs and yyy millisecs").
Jul 2 02:33:12 bree last message repeated 2070566 times
Hm, das sind ja nur 35000 Läufe des mainloops pro sekunde, ich muß den Code doch mal optimieren ;-)
Selbstverfreilich hat powersave unter SuSE 9.2 zur Zufriedenheit funktioniert... Hat mal wer 'nen Tip wo ich dran schrauben kann?
Laß uns erst mal die Spuren sichern ;-) -- Stefan Seyfried