Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1457690
| From | Jia He <hejianet@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC PATCH 2/3] net: Replace for_each_possible_cpu with for_each_online_cpu |
| Date | 2016-08-08 12:30 +0200 |
| Message-ID | <s3PYK-7f-51@gated-at.bofh.it> (permalink) |
| References | <s3PYJ-7f-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
In PowerPC server with large number cpus, the loop index in smt=1 could be
reduced to 1/8 compared with smt=8.
Thus cache misses can be reduced.
Signed-off-by: Jia He <hejianet@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: James Morris <jmorris@namei.org>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: Patrick McHardy <kaber@trash.net>
---
net/ipv6/addrconf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 43fa8d0..1fce613 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4969,7 +4969,7 @@ static inline void __snmp6_fill_stats64(u64 *stats, void __percpu *mib,
buff[0] = IPSTATS_MIB_MAX;
- for_each_possible_cpu(c) {
+ for_each_online_cpu(c) {
for (i = 1; i < IPSTATS_MIB_MAX; i++)
buff[i] += snmp_get_cpu_field64(mib, c, i, syncpoff);
}
--
2.5.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH 0/3] net: Improve snmp6_fill_stats Jia He <hejianet@gmail.com> - 2016-08-08 12:30 +0200
[RFC PATCH 1/3] net: Remove unnecessary memset in __snmp6_fill_stats64 Jia He <hejianet@gmail.com> - 2016-08-08 12:30 +0200
Re: [RFC PATCH 1/3] net: Remove unnecessary memset in __snmp6_fill_stats64 Florian Westphal <fw@strlen.de> - 2016-08-08 13:20 +0200
Re: [RFC PATCH 1/3] net: Remove unnecessary memset in __snmp6_fill_stats64 hejianet <hejianet@gmail.com> - 2016-08-08 15:10 +0200
Re: [RFC PATCH 1/3] net: Remove unnecessary memset in __snmp6_fill_stats64 Eric Dumazet <eric.dumazet@gmail.com> - 2016-08-09 12:20 +0200
[RFC PATCH 2/3] net: Replace for_each_possible_cpu with for_each_online_cpu Jia He <hejianet@gmail.com> - 2016-08-08 12:30 +0200
Re: [RFC PATCH 2/3] net: Replace for_each_possible_cpu with for_each_online_cpu David Miller <davem@davemloft.net> - 2016-08-08 20:00 +0200
Re: [RFC PATCH 2/3] net: Replace for_each_possible_cpu with for_each_online_cpu Eric Dumazet <eric.dumazet@gmail.com> - 2016-08-09 12:20 +0200
[RFC PATCH 3/3] net: Remove the useless parameter of __snmp6_fill_statsdev Jia He <hejianet@gmail.com> - 2016-08-08 12:30 +0200
csiph-web