Re: [PATCHSET] block, mempool, percpu: implement percpu mempool andfix blkcg percpu alloc deadlock
From: Andrew Morton
Date: Tue Dec 27 2011 - 16:25:12 EST
On Fri, 23 Dec 2011 09:58:56 -0500
Vivek Goyal <vgoyal@xxxxxxxxxx> wrote:
> > Why do the allocation during I/O? Can't it be done in the hotplug handler?
> Even if we can do it in hotplug handler it will be very wasteful of
> memory. So if there are 100 IO cgroups in the system, upon every block
> device hotplug, we will allocate per cpu memory for all the 100 cgroups,
> irrespective of the fact whether they are doing IO to the device or not.
> Now expand this to a system with 100 cgroups and 100 Luns. 10000
> allocations for no reason. (Even if we do it for cgroups needing stats,
> does not help much). Current scheme allocates memory for the group
> only if a sepcific cgroup is doing IO to a specific block device.
umm, we've already declared that it is OK to completely waste this
memory for the users (probably a majority) who will not be using
Also, has this stuff been tested at that scale? I fear to think what
10000 allocations will do to fragmetnation of the vmalloc() arena.
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/