Re: Unnecessary Action from chipcardd2?

Joachim Breitner <[email protected]>
Newsgroups gmane.comp.lib.libchipcard.devel
Message-ID <[email protected]>
Hi,

Am Donnerstag, den 22.02.2007, 18:07 +0100 schrieb Martin Preuss:
> On Thursday 22 February 2007 13:25, Joachim Breitner wrote:
> [...]
> > It seems that chipcardd2 is checking every 750ms for new hardware on the
> > USB Bus. It thought that this is not necessary any more, because
> > chipcardd2 will be notified somehow (udev? HAL?)?
> [...]
> 
> No, it only checks every 2 secs for new hardware (but that is user adjustable, 
> see example configuration file).
> 
> The 750ms is the timeout when waiting for changes on the sockets (using the 
> select() system call on listening and connected sockets of the daemon).
> 
> This value could be increased in libchipcard (and I think the daemon uses much 
> higher values than that?).

No, it seems the 750 is hard-coded in chipcardd2, at least the version
of the code that I got lying around here.

But is that necessary? Itn’t it possible to do some magic with select
(I’m not an expert) and the OS will wake the process up as soon as
something relevant happens? 

IMHO a usually rarely used daemon like chipcardd2 should be active only
when there is something to do (clients asking for interaction, and maybe
new hardware to register). If the process would really sleep all the
remaining time it will be swapped out eventually and cause no more
penalty, performance or power wise. I know it’s a high and sometimes
unreachable goal, but something worth to keep in mind.

> 
> [...]
> > Any maybe the hardware discovery should be skipped if no client is
> > connected to the server.
> [...]
> 
> Hmm, that's an interesting idea...
> 
> BTW: At least libchipcard3 can be used in a kind of poll-on-demand mode (only 
> look for changes upon receiption of a signal), but that's currently not fully 
> tested (and I don't know right now whether the signal handler is already 
> enabled in current versions of libchipcard3).

I’m looking forward to that. Is it already usable? Will it show up in
Debian soon?

Greetings,
Joachim
-- 
Joachim Breitner
  e-Mail: [email protected]
  Homepage: http://www.joachim-breitner.de
  ICQ#: 74513189

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Libchipcard-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libchipcard-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.