Messages in this thread | | | Date | Thu, 1 Oct 2009 08:56:50 +0900 | From | nishimura@mxp ... | Subject | Re: [RFC][PATCH 1/2] percpu array counter like vmstat |
| |
> On Wed, 30 Sep 2009 19:09:43 +0900 > KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote: > >> +int array_counter_init(struct array_counter *ac, int size) >> +{ >> + ac->v.elements = size; >> + ac->v.counters = alloc_percpu(s8); > This is a bug, of course... Yes, I was confused at that point and about to pointing it out :)
> should be > ac->v.counters = __alloc_percpu(size, __alignof__(char)); > __alloc_pecpu(size * sizeof(s8), __alignof__(s8)) would be better ? There is no actual difference, though.
Thanks, Daisuke Nishimura.
| |