[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87shmngey7.fsf@notabene.neil.brown.name>
Date: Thu, 09 Mar 2017 17:08:16 +1100
From: NeilBrown <neilb@...e.com>
To: Mikulas Patocka <mpatocka@...hat.com>
Cc: Mike Snitzer <snitzer@...hat.com>, Jens Axboe <axboe@...nel.dk>,
Jack Wang <jinpu.wang@...fitbricks.com>,
LKML <linux-kernel@...r.kernel.org>,
Lars Ellenberg <lars.ellenberg@...bit.com>,
Kent Overstreet <kent.overstreet@...il.com>,
Pavel Machek <pavel@....cz>
Subject: Re: blk: improve order of bio handling in generic_make_request()
On Wed, Mar 08 2017, Mikulas Patocka wrote:
> On Wed, 8 Mar 2017, NeilBrown wrote:
>>
>> I don't think this will fix the DM snapshot deadlock by itself.
>> Rather, it make it possible for some internal changes to DM to fix it.
>> The DM change might be something vaguely like:
>>
>> diff --git a/drivers/md/dm.c b/drivers/md/dm.c
>> index 3086da5664f3..06ee0960e415 100644
>> --- a/drivers/md/dm.c
>> +++ b/drivers/md/dm.c
>> @@ -1216,6 +1216,14 @@ static int __split_and_process_non_flush(struct clone_info *ci)
>>
>> len = min_t(sector_t, max_io_len(ci->sector, ti), ci->sector_count);
>>
>> + if (len < ci->sector_count) {
>> + struct bio *split = bio_split(bio, len, GFP_NOIO, fs_bio_set);
>
> fs_bio_set is a shared bio set, so it is prone to deadlocks. For this
> change, we would need two bio sets per dm device, one for the split bio
> and one for the outgoing bio. (this also means having one more kernel
> thread per dm device)
Yes, two local bio_sets would be best.
But we don't really need those extra kernel threads. I'll start working
on patches to make them optional, and then to start removing them.
Thanks,
NeilBrown
Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)
Powered by blists - more mailing lists