[Openswan dev] KLIPS tdb_lock as rwlock instead of spinlock?
jagdish.motwani at elitecore.com
Wed Apr 11 09:42:31 EDT 2012
Can tdb_lock be converted from spinlock to rwlock?
From what i know, tdb_lock is used to protect sa.
ipsec_xmit.c & ipsec_rcv.c just uses
them for reading(get) sa.
While experimenting with KLIPS, i converted this tdb_lock to
rwlock_t and performed the below given test.
I got desired results but i am not sure about any side-effects of
this conversion. Please provide your valuable input.
Test setup details:
----------(Ipsec tunnel)---------------- Road warrior
Test Machine has 8 cores, I have binded interrupts to only 3 of
LAN1 -- cpu1
LAN2 -- cpu2
Roadwarrior -- cpu3
Traffic flows from LAN1 and LAN2 to Road warrior. (I used iperf
to generate traffic: iperf server is at road warrior and clients in LAN1
1) in ipsec_tunnel.c
dev->tx_queue_len = 0; /* No qdisc
*/ (Earlier it was 10)
dev->features |= NETIF_F_LLTX; /* No tx lock */
2)Converted tdb_lock from spinlock_t to rwlock_t
Instead of spin_lock_bh used
read_lock_bh in ipsec_xmit.c
Before Change: 225 Mbps (cpu1 and cpu2 are not being 100%
After Change: 350 Mbps (both cpus1 and cpu2 are being
Also, One more question: Is there any know side effect of
dev->tx_queue_len=0? Why is it 10 by default?
Elitecore Technologies Pvt. Ltd.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Dev