Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1215721
| From | Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once |
| Date | 2015-08-29 10:00 +0200 |
| Message-ID | <q2Jdo-3WQ-3@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <q2afE-4d2-29@gated-at.bofh.it> <q2luq-3FD-17@gated-at.bofh.it> <q2wzw-2Pm-15@gated-at.bofh.it> <q2Ex3-5GK-5@gated-at.bofh.it> <q2F06-6tC-3@gated-at.bofh.it> |
| Organization | IBM |
On 08/29/2015 08:56 AM, Eric Dumazet wrote: > On Sat, 2015-08-29 at 08:27 +0530, Raghavendra K T wrote: >> >> /* Use put_unaligned() because stats may not be aligned for u64. */ >> put_unaligned(items, &stats[0]); > > >> for (i = 1; i < items; i++) >> - put_unaligned(snmp_fold_field64(mib, i, syncpoff), &stats[i]); >> + put_unaligned(buff[i], &stats[i]); >> > > I believe Joe suggested following code instead : > > buff[0] = items; > memcpy(stats, buff, items * sizeof(u64)); Thanks. Sure, will use this. (I missed that. I thought that it was applicable only when we have aligned data,and for power, put_aunaligned was not a nop unlike intel). > > Also please move buff[] array into __snmp6_fill_stats64() to make it > clear it is used in a 'leaf' function. Correct. > > (even if calling memcpy()/memset() makes it not a leaf function) > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH RFC V2 0/2] Optimize the snmp stat aggregation for large cpus Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> - 2015-08-26 19:50 +0200
[PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> - 2015-08-26 19:50 +0200
Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once David Miller <davem@davemloft.net> - 2015-08-27 20:40 +0200
Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> - 2015-08-28 08:40 +0200
Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once David Miller <davem@davemloft.net> - 2015-08-28 20:30 +0200
Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once Joe Perches <joe@perches.com> - 2015-08-28 21:30 +0200
Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once Eric Dumazet <eric.dumazet@gmail.com> - 2015-08-28 22:40 +0200
Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once Eric Dumazet <eric.dumazet@gmail.com> - 2015-08-28 23:00 +0200
Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once Joe Perches <joe@perches.com> - 2015-08-28 23:10 +0200
Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once Eric Dumazet <eric.dumazet@gmail.com> - 2015-08-28 23:20 +0200
Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once Joe Perches <joe@perches.com> - 2015-08-28 23:30 +0200
Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once Eric Dumazet <eric.dumazet@gmail.com> - 2015-08-29 00:30 +0200
Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once Joe Perches <joe@perches.com> - 2015-08-29 01:20 +0200
Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once Eric Dumazet <eric.dumazet@gmail.com> - 2015-08-29 02:10 +0200
Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once Joe Perches <joe@perches.com> - 2015-08-29 02:40 +0200
Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once Eric Dumazet <eric.dumazet@gmail.com> - 2015-08-29 03:10 +0200
Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once Joe Perches <joe@perches.com> - 2015-08-28 23:00 +0200
Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> - 2015-08-29 05:00 +0200
Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once Eric Dumazet <eric.dumazet@gmail.com> - 2015-08-29 05:30 +0200
Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> - 2015-08-29 10:00 +0200
Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once David Miller <davem@davemloft.net> - 2015-08-29 07:20 +0200
Re: [PATCH RFC V2 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> - 2015-08-29 10:00 +0200
csiph-web