[Ocf-linux-users] talitos driver should be preemtive
Brought to you by:
david-m
From: A. I. G. <ai....@al...> - 2010-05-24 21:37:25
|
Hello. My name is Alexandru and I'm doing my final degree project about porting Linux to a embedded device (a router), that uses a 8272 of Freescale. My issue to solve is provide IPsec to the router. The software that I used is a Linux 2.6.19 + Quagga + Openssl + ipsec-tools. The point was that the processor (8272) came with a crypto-processor embedded in it that should help in the encryption process. I've found this excelent project that provide the support of hardware encryption with Cryptodev + Talitos driver. Also, the patch for Openssl works perfectly and I've obtained the feature that I need. After making some benchmarks I've discovered that talitos is not preemtive. The crypto-processor (SEC) should make the operations of encryption/decryption and let the processor idle; the scheduler should be called and let another process to enter as "active process". After the crypto-processor finish the job, it should say "I'm done!" by a IRQ signal and the other encryption process that need the encrypted data should be activated and continue getting the crypted data from the address of memory where the crypto-processor writted it. Well, the behaviour of talitos seems not to be like that. It's look like the processor is waiting for the crypto-processor to finish, and after that it gets the crypted data.That wastes the time of the processor while is waiting for the crypto-processor to finish. Maybe I'm wrong, but the benchmarks looks like (2 processes means 1 crypting and another doing an infinite loop a=1+1): no CD(R) no CD(U) no CD (S) 1 process crypting 0.36 0.13 0.20 2 processes(1+1*) 0.72 0.13 0.20 It looks normal without Cryptodev that the user and system time be the same, but the the real be double, because there's another process requiring the CPU. Benchmarking the system with Cryptodev I've obtain the more or less the same times (much more system time that without it), but it's not exactly the double, it's 0,02 less (0.36*2 - 0.02). That's it improving the time, but not really how much I've expected. And it is because crypto-processor doesn't leave free the processor. I want to add preemtion to talitos, does anyone is working already on it? May I help? Thank you. Best regards, Alexandru |