All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: dm-devel@redhat.com, Mike Snitzer <snitzer@redhat.com>,
	Alasdair Kergon <agk@redhat.com>
Subject: Re: [PATCH/rfc] dm: revise 'rescue' strategy for md->bs allocations
Date: Fri, 01 Sep 2017 13:48:40 +1000	[thread overview]
Message-ID: <87inh3dqp3.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <alpine.LRH.2.02.1708312233010.32309@file01.intranet.prod.int.rdu2.redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 965 bytes --]

On Thu, Aug 31 2017, Mikulas Patocka wrote:

>> 
>> Note that only current->bio_list[0] is offloaded.  current->bio_list[1]
>> contains bios that were scheduled *before* the current one started, so
>
> These bios need to be offloaded too, otherwise you re-introduce this 
> deadlock: https://www.redhat.com/archives/dm-devel/2014-May/msg00089.html

Thanks for the link.
In the example the bio that is stuck was created in step 4.  The call
to generic_make_request() will have placed it on current->bio_list[0].
The top-level generic_make_request call by Process A is still running,
so nothing will have moved the bio to ->bio_list[1].  That only happens
after the ->make_request_fn completes, which must be after step 7.
So the problem bio is on ->bio_list[0] and the code in my patch will
pass it to a workqueue for handling.

So I don't think the deadlock would be reintroduced.  Can you see
something that I am missing?

Thanks,
NeilBrown

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2017-09-01  3:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-31  6:18 [PATCH/rfc] dm: revise 'rescue' strategy for md->bs allocations NeilBrown
2017-09-01  2:38 ` Mikulas Patocka
2017-09-01  3:48   ` NeilBrown [this message]
2017-09-02  1:34     ` Mikulas Patocka
2017-09-04  0:12       ` NeilBrown
2017-09-04 16:54         ` Mikulas Patocka
2017-09-05 23:43           ` NeilBrown
2017-09-06 22:57             ` Mikulas Patocka
2017-09-07  3:19               ` NeilBrown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87inh3dqp3.fsf@notabene.neil.brown.name \
    --to=neilb@suse.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=mpatocka@redhat.com \
    --cc=snitzer@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.