[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87zieuq59m.fsf@notabene.neil.brown.name>
Date: Wed, 03 May 2017 08:10:29 +1000
From: NeilBrown <neilb@...e.com>
To: Ming Lei <ming.lei@...hat.com>
Cc: Jens Axboe <axboe@...nel.dk>, linux-block@...r.kernel.org,
Ming Lei <tom.leiming@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 03/13] blk: make the bioset rescue_workqueue optional.
On Tue, May 02 2017, Ming Lei wrote:
> On Tue, May 02, 2017 at 01:42:24PM +1000, NeilBrown wrote:
>> This patch converts bioset_create() and
>> bioset_create_nobvec() to not create a workqueue so
>> alloctions will never trigger punt_bios_to_rescuer(). It
>> also introduces bioset_create_rescued() and
>> bioset_create_nobvec_rescued() which preserve the old
>> behaviour.
>>
>> All callers of bioset_create() and bioset_create_nobvec(),
>> that are inside block device drivers, are converted to the
>> _rescued() version.
>
> The above comment about *_nobvec() need to be updated.
Yes - thanks. I'll post an updated version.
>
>>
>> biosets used by filesystems or other top-level users do not
>> need rescuing as the bio can never be queued behind other
>> bios. This includes fs_bio_set, blkdev_dio_pool,
>> btrfs_bioset, xfs_ioend_bioset, drbd_md_io_bio_set,
>> and one allocated by target_core_iblock.c.
>>
>> biosets used by md/raid to not need rescuing as
>> their usage was recently audited to revised to never
>> risk deadlock.
>>
>> It is hoped that most, if not all, of the remaining biosets
>> can end up being the non-rescued version.
>>
>> Signed-off-by: NeilBrown <neilb@...e.com>
>> ---
>> block/bio.c | 12 ++++++++++--
>> block/blk-core.c | 2 +-
>> drivers/md/bcache/super.c | 6 ++++--
>> drivers/md/dm-crypt.c | 2 +-
>> drivers/md/dm-io.c | 2 +-
>> drivers/md/dm.c | 5 +++--
>> include/linux/bio.h | 1 +
>> 7 files changed, 21 insertions(+), 9 deletions(-)
>
> DRBD can stack on block device too, so I guess it might need
> BIOSET_NEED_RESCUER?
A bioset only needs a rescuer is an allocation is made from the bioset
inside a make_request_fn.
The bioset in DRBD is drbd_md_io_bio_set is used for metadata IO, and
I think it is only used in a worker thread, where rescuing cannot help.
But that is probably subtle enough that I should leave the removal
of the rescuer to a subsequent patch.
So I'll give DRBD the flag when I update the changelog comment.
Thanks,
NeilBrown
Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)
Powered by blists - more mailing lists