lkml.org 
[lkml]   [2018]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V2 1/2] blk-mq: init hctx sched after update ctx and hctx mapping
From
Date
Hi Ming

On 08/17/2018 05:33 PM, Ming Lei wrote:
>> + /*
>> + * elevator_release will put it.
>> + */
>> + __module_get(q->elv_type->elevator_owner);
> I understand what elevator_release() frees is the 'ref-counter' got in
> elevator_get(), but who will be the counter-pair of the above __module_get()?


Sorry for my bad description.

The code path is:

elevator_release
-> elevator_put(e->type)
-> module_put(e->elevator_owner)

In normal elevator switch path, elevator_get will hold a reference counter of the
elevator_owner.
In this patch set, the elevator_type is saved directly. To prevent the io scheduler module
is removed, we need to hold a reference of the module.

Thanks
Jianchao

\
 
 \ /
  Last update: 2018-08-20 03:30    [W:0.045 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site