lkml.org 
[lkml]   [2014]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH percpu/for-3.17 1/2] percpu: implement percpu_pool
On Fri, 18 Jul 2014 16:08:04 -0400 Tejun Heo <tj@kernel.org> wrote:

> percpu allocator requires sleepable context for allocations. Most use
> cases are fine with the requirement but blk-throttle currently
> implements its own asynchronous allocation mechanism to allow
> initiating allocation from atomic contexts and there are expected to
> be more similar use cases.
>
> It'd be best to make percpu allocator take GFP mask like other
> allocators but its entanglement with kernel virtual address management
> makes it very cumbersome. Also, percpu allocations from atomic
> contexts are likely to remain highly restricted.
>
> This patch implements a simple asynchronous allocation pool, named
> percpu_pool, which can be used from any context and is refilled
> automatically. A pool is initialized with the size and alignment of
> the percpu areas to serve and the low an high watermarks. When the
> number of cached areas fall below the low watermark, a work item is
> kicked off to fill it up to the high mark. A pool can be statically
> defined and can be manually filled and emptied.

I don't think we should add facilities such as this. Because if we do,
people will use them and thereby make the kernel less reliable, for
obvious reasons.

It would be better to leave the nasty hack localized within
blk-throttle.c and hope that someone finds a way of fixing it.



\
 
 \ /
  Last update: 2014-08-01 08:21    [W:0.225 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site