Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a system with a loopback kernel module installed. Through a bunch of routing and iptable rules, packets coming out of the loopback interface are sent over an ipsec tunnel. I am seeing that under load, the kernel panics or dumps a lot of messages that say "BUG: soft lockup - CPU#0 stuck for X secs".

The stack trace is always in an encryption function like crypto_cbc_encrypt or des3_ede_encrypt. There is a lot of traffic going over the ipsec tunnels and the system is spending lot of time in encryption+decryption.

My concern is that it is always CPU 0. How do I ensure that other CPUs are also sharing the crypto load. I have seen sometimes when the ksoftirq0 thread is at 100%. Again it is always cpu0. This is mostly happening when packets are being forward from the loopback interface, go through the xfrm rules and into the tunnels.

How do I also check the CPU mask for the loopback kernel module? Is there such a thing?

share|improve this question
    
What processor do you have (exact model), what kernel version, from what distribution? I wonder if you're using a hardware accelerator, what does /proc/crypto contain (after using IPsec for a bit: algorithms may be loaded on demand)? I'd be more concerned about the bug than about the CPU balance at this stage. There is no CPU mask for kernel threads AFAIK. –  Gilles May 29 '14 at 23:02
    
I am using 10.04 LTS (old, I know, but am stuck with it for now). Processor is a 16 core Xeon E5620. No hardware accelerator. I have also hit the CPU lockup problem in the xfrm gc functions, where in I think the bug I am hitting is fixed by this patch mentioned here - comments.gmane.org/gmane.linux.network/210854 . –  skp May 30 '14 at 1:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.