From: Arne Jansen <sensille@gmx.net>
To: Mitch Harder <mitch.harder@sabayonlinux.org>
Cc: chris.mason@oracle.com, linux-btrfs@vger.kernel.org,
list.btrfs@jan-o-sch.net
Subject: Re: [PATCH] Btrfs: fix deadlock in wait_for_more_refs
Date: Tue, 07 Aug 2012 07:28:55 +0200 [thread overview]
Message-ID: <5020A797.6010108@gmx.net> (raw)
In-Reply-To: <CAKcLGm-GOA-XpNwyYCNYb3cXeDkzmd1KyYRg=6MJuoe7EhAR+A@mail.gmail.com>
On 08/07/2012 07:03 AM, Mitch Harder wrote:
> On Mon, Aug 6, 2012 at 3:18 PM, Arne Jansen <sensille@gmx.net> wrote:
>> Commit a168650c introduced a waiting mechanism to prevent busy waiting in
>> btrfs_run_delayed_refs. This can deadlock with btrfs_run_ordered_operations,
>> where a tree_mod_seq is held while waiting for the io to complete, while
>> the end_io calls btrfs_run_delayed_refs.
>> This whole mechanism is unnecessary. If not enough runnable refs are
>> available to satisfy count, just return as count is more like a guideline
>> than a strict requirement.
>> In case we have to run all refs, commit transaction makes sure that no
>> other threads are working in the transaction anymore, so we just assert
>> here that no refs are blocked.
>>
>
> I've been testing this patch after manually merging on top of Josef's
> "Btrfs: barrier before waitqueue_active V2" patch.
>
> With that arrangement, I've been unable to reproduce the deadlock on my system.
>
> I'll continue banging away on it tomorrow, and let you know if I
> attain a deadlock.
>
> Also, let me know if you need me to test without including Josef's
> added barriers.
The problem at hand hadn't had anything to do with barriers, so Josef's
patch shouldn't be necessary for this particular problem. If it fixes
other ones I can't tell.
>
prev parent reply other threads:[~2012-08-07 5:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-06 20:18 [PATCH] Btrfs: fix deadlock in wait_for_more_refs Arne Jansen
2012-08-07 5:03 ` Mitch Harder
2012-08-07 5:28 ` Arne Jansen [this message]
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=5020A797.6010108@gmx.net \
--to=sensille@gmx.net \
--cc=chris.mason@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=list.btrfs@jan-o-sch.net \
--cc=mitch.harder@sabayonlinux.org \
/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.