[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <96657784-dd95-6ea9-3ffd-25737c534075@oracle.com>
Date: Mon, 20 Aug 2018 09:29:36 +0800
From: "jianchao.wang" <jianchao.w.wang@...cle.com>
To: Ming Lei <tom.leiming@...il.com>
Cc: Jens Axboe <axboe@...nel.dk>,
Bart Van Assche <bart.vanassche@....com>,
Keith Busch <keith.busch@...ux.intel.com>,
linux-block <linux-block@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2 1/2] blk-mq: init hctx sched after update ctx and hctx
mapping
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
Powered by blists - more mailing lists