Hi, On Samstag, 6. Juni 2009, Bas Wijnen wrote: > On Fri, Jun 05, 2009 at 07:17:15PM +0200, Martin Preuss wrote: [...] > > As a matter of fact the daemon *does* have a main loop which uses > > select() and which *can* be interrupted after a few seconds to scan > > for new devices or the disconnection of existing devices. If setup > > correctly the daemon even only looks for new devices upon receiption > > of a signal (which can be generated by udev). > > So you are saying that my assumption that the select loop did not have > an infinite timeout (in the Debian setup) was in fact correct. I don't > see a problem with pointing in the right direction in a bug report... [...]
It can't have an infinite loop: It runs in a single thread and needs to do some cleanup from time to time (e.g. releasing readers and cards after some timeout etc). Please note that compared to other chipcard daemons libchipcard4 is probably more power conserving since it doesn't open devices as long as they aren't used (which allows USB autosuspend to kick in). BTW: How do you determine how much CPU time the daemon is using? You are aware that the output of "top" is not as reliable a source as one might think? If you don't use the service of the chipcard daemon it mainly sits on a select() call and waits. If hardware polling is enabled then it wakes up every 1-2 seconds and checks for new hardware. If not it sleeps about 10s and then shortly looks for due chores. If there are none the daemon immediately falls back to sleep. So the daemon can't be using 4-5% of your CPU ressources since it mostly sleeps (if not used). Regards Martin -- "Things are only impossible until they're not" Martin Preuss - http://www2.aquamaniac.de/ AqBanking - http://www.aqbanking.de/ LibChipcard - http://www.libchipcard.de/

