Thread (28 messages) 28 messages, 4 authors, 2017-03-28

Re: [PATCH v2] blkcg: allocate struct blkcg_gq outside request queue spinlock

From: Tejun Heo <tj@kernel.org>
Date: 2017-03-03 19:25:53
Also in: lkml

Hello, Tahsin.

On Thu, Mar 02, 2017 at 02:33:11PM -0800, Tahsin Erdogan wrote:
quoted
And let blkg_create() verify these conditions after releasing and
regrabbing the lock.

This also means that the init path can simply pass in GFP_KERNEL.
I tried that approach, but I encountered two issues that complicate things:

1) Pushing down blk_queue_bypass(q) check in blkg_create() doesn't
quite work because when blkcg_init_queue() calls blkg_create(), the
queue is still in bypassing mode.

2) Pushing down blkcg_policy_enabled() doesn't work well either,
because blkcg_init_queue() doesn't have a policy to pass down. We
could let it pass a NULL parameter but that would make blkg_create
more ugly.
I see.  It kinda really bothers me that we'll have two different modes
for non-atomic allocations.  Can't we bind both to the policy
parameter?  Skip the checks if policy is NULL?

Thanks.

-- 
tejun
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help