lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <4AF42C07.4050008@gmail.com> Date: Fri, 06 Nov 2009 15:00:39 +0100 From: Eric Dumazet <eric.dumazet@...il.com> To: Rémi Denis-Courmont <remi@...lab.net> CC: netdev@...r.kernel.org, Rémi Denis-Courmont <remi.denis-courmont@...ia.com> Subject: Re: [PATCH net-next] Phonet: use rwlock for sockets list Rémi Denis-Courmont a écrit : > It seems better than a spinlock, assuming that sockets are > created/destroyed more seldom than they receive packets. And then > sk_for_each_rcu does not exist. I am sure there is a good reason for that, > though I wouldn't know. I guess I should try to use RCU hlist_nulls then? > spin_lock()/spin_unlock() is faster than read_lock()/read_unlock(), unless there is contention. (two atomic ops instead of one) So, unless you have a particular performance problem, it's actually better to use a spinlock. If you do have performance problem, a RCU conversion is better than rwlock. I can do RCU conversion if you ask me... -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists