Re: [RFC][PATCH 1/2] percpu array counter like vmstat

From: KAMEZAWA Hiroyuki
Date: Wed Sep 30 2009 - 19:34:43 EST


On Wed, 30 Sep 2009 19:09:43 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> 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...
should be
ac->v.counters = __alloc_percpu(size, __alignof__(char));

Regads,
-Kame

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/