[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111223144647.GA16818@redhat.com>
Date: Fri, 23 Dec 2011 09:46:47 -0500
From: Vivek Goyal <vgoyal@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Tejun Heo <tj@...nel.org>, avi@...hat.com, nate@...nel.net,
cl@...ux-foundation.org, oleg@...hat.com, axboe@...nel.dk,
linux-kernel@...r.kernel.org
Subject: Re: [PATCHSET] block, mempool, percpu: implement percpu mempool and
fix blkcg percpu alloc deadlock
On Thu, Dec 22, 2011 at 05:58:34PM -0800, Andrew Morton wrote:
> On Thu, 22 Dec 2011 20:40:43 -0500 Vivek Goyal <vgoyal@...hat.com> wrote:
>
> > That's why the need of per cpu data structures to make stat collection
> > lockless.
>
> btw, (and this is a common refrain): was there any reason for avoiding
> using percpu_counters here?
IIUC, per cpu counters also call alloc_percpu() during initialization.
int __percpu_counter_init(struct percpu_counter *fbc, s64 amount,
struct lock_class_key *key)
{
raw_spin_lock_init(&fbc->lock);
lockdep_set_class(&fbc->lock, key);
fbc->count = amount;
fbc->counters = alloc_percpu(s32);
....
....
}
So they are no good either for allocation and initialization in IO path.
Thanks
Vivek
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists