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: Thu, 1 Nov 2012 14:33:45 +0000 From: Christoph Lameter <cl@...ux.com> To: Shan Wei <shanwei88@...il.com> cc: jesse@...ira.com, dev@...nvswitch.org, NetDev <netdev@...r.kernel.org>, Kernel-Maillist <linux-kernel@...r.kernel.org>, David Miller <davem@...emloft.net> Subject: Re: [PATCH 4/9] net: openvswitch: use this_cpu_ptr per-cpu helper On Thu, 1 Nov 2012, Shan Wei wrote: > But for different field in same per-cpu variable, how to guarantee n_missed > and n_hit are from same cpu? > this_cpu_read(dp->stats_percpu->n_missed); > [processor changed] > this_cpu_read(dp->stats_percpu->n_hit); What does current guarantee that? If it is guaranteed then you can use the __this_cpu_xxx ops. > In addition, following usage of per_cpu_ptr can be replaced by this_cpu_read. > > cpu=get_cpu() > .... > *per_cpu_ptr(p,cpu) > .... > .... > put_cpu() Right. -- 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