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
| ||
|
Date: Wed, 26 Jan 2011 15:31:11 -0800 (PST) From: David Miller <davem@...emloft.net> To: eric.dumazet@...il.com Cc: netdev@...r.kernel.org Subject: Re: [RFC PATCH] net: Implement read-only protection and COW'ing of metrics. From: David Miller <davem@...emloft.net> Date: Wed, 26 Jan 2011 15:25:38 -0800 (PST) > Finally, once this change is stabilized we can be a lot smarter about > what we do at the time an entry is created. For example, when a route > is looked up for a TCP socket, we essentially know we are going to COW > the route %99.99999 of the time. So we can pass a hint into TCP's > route lookups in the flow flags field telling it to pre-COW the route. > > TCP pre-COW'ing of metrics will thus save several atomics. I forgot to mention one other idea I had. To get rid of the atomics in the non-TCP cases, we note that pretty much all routes installed have no special metrics attached, the fib_info metrics are equal to dst_default_metrics. This means if we check for this case, we can point the dst->_metrics at dst_default_metrics and then we don't need to do any atomics at all. Just one straight assignment at creation and then absolutely no work at all during destroy. We could even consider allocating fib_info->metrics externally, and point it directly at dst_default_metrics when possible. This is going to save an enormous amount of memory as well as get rid of the atomics. So Eric, I really hope I can sell you on this :-) -- 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