Re: High CPU load with pcscd and Kerkey security Module
Oliver Graute <[email protected]> Mon, 21 Nov 2016 11:47:09 +0100
| Newsgroups | gmane.comp.lib.muscle |
|---|---|
| Message-ID | <CA+KjHfa4R_ZbS5AKisgd3nTH-1bo+ow+wQ8nky-r_rajmhtfWA@mail.gmail.com> |
On Fri, Nov 18, 2016 at 1:37 PM, Ludovic Rousseau <[email protected]> wrote: > 2016-11-18 10:24 GMT+01:00 Oliver Graute <[email protected]>: >> On Wed, Nov 16, 2016 at 2:31 PM, Ludovic Rousseau >> <[email protected]> wrote: > I could not find a real problem in your logs. > > Your PC/SC application is NOT efficient and you could gain of lot of CPU cycle. > - replace SCardStatus() busy loop by SCardGetStatusChange() > - do not use SCardBeginTransaction()/SCardEndTransaction() with no > APDU exchange in between. It is useless, unless I missed something. Many thanks for your analysis and your comment. My pcscd-spy debugging leads to similar results Results sorted by total execution time total time: 597.958052 sec 42.015016 sec (308 calls) 7.03% SCardTransmit 9.974089 sec (1687 calls) 1.67% SCardStatus > Are you the author of the PC/SC application running on your board? No, we are using a custom libpkk11 PKCS11# Host middleware on top of pcscd, unfortunately this lib is closed source for me. So I need to contact the Libkkp11 team (ST Microsystem) to investigate this further. Best Regards, Oliver