linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arne Jansen <sensille@gmx.net>
To: Mitch Harder <mitch.harder@sabayonlinux.org>
Cc: Josef Bacik <jbacik@fusionio.com>,
	linux-btrfs@vger.kernel.org,
	Alexander Block <ablock84@googlemail.com>
Subject: Re: [PATCH] Btrfs: barrier before waitqueue_active
Date: Sun, 05 Aug 2012 11:18:28 +0200	[thread overview]
Message-ID: <501E3A64.1080405@gmx.net> (raw)
In-Reply-To: <CAKcLGm9sJNRmrVvruwpYZM-eQo7TRUY9HwZ5rYOKLo7+KEWWkA@mail.gmail.com>

On 08/03/2012 04:43 PM, Mitch Harder wrote:
> On Wed, Aug 1, 2012 at 7:21 PM, Mitch Harder
> <mitch.harder@sabayonlinux.org> wrote:
>> On Wed, Aug 1, 2012 at 3:25 PM, Josef Bacik <jbacik@fusionio.com> wrote:
>>> We need an smb_mb() before waitqueue_active to avoid missing wakeups.
>>> Before Mitch was hitting a deadlock between the ordered flushers and the
>>> transaction commit because the ordered flushers were waiting for more refs
>>> and were never woken up, so those smp_mb()'s are the most important.
>>> Everything else I added for correctness sake and to avoid getting bitten by
>>> this again somewhere else.  Thanks,
>>>
>>
>> This patch seems to make it tougher to hit a deadlock, but I'm still
>> encountering intermittent deadlocks using this patch when running
>> multiple rsync threads.
>>
>> I've also tested "Patch 2", and that has me hitting a deadlock even
>> quicker (when starting several copying threads).
>>
>> I also found a slight performance hit using this patch.  On a 3.4.6
>> kernel (merged with the 3.5_rc for-linus branch), I would typically
>> complete my rsync test in ~265 seconds.  Also, I can't recall hitting
>> a deadlock on the 3.4.6 kernel (with 3.5_rc for-linus).  When using
>> this patch, the test would take ~310 seconds (when it didn't hit a
>> deadlock).
>>
> 
> I've bisected my deadlock back to:
> Btrfs: hooks for qgroup to record delayed refs (commit 546adb0d).
> 

I've got it reproduced here and, I think, nailed it down. I'll send a
patch tomorrow after discussing it with Jan.

-Arne

> This issue may be the same problem Alexander Block is discussing in
> another thread on the Btrfs Mailing List:
> http://article.gmane.org/gmane.comp.file-systems.btrfs/19028
> 
> I'm using multiple rsync threads instead of the new send/receive
> function.  But we're both hitting deadlocks that bisect back to the
> same commit.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2012-08-05  9:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-01 20:25 [PATCH] Btrfs: barrier before waitqueue_active Josef Bacik
2012-08-02  0:21 ` Mitch Harder
2012-08-03 14:43   ` Mitch Harder
2012-08-05  9:18     ` Arne Jansen [this message]
2012-08-02 10:46 ` Liu Bo
2012-08-02 12:11   ` Josef Bacik
2012-08-02 13:02     ` David Sterba
2012-08-02 13:01   ` cwillu

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=501E3A64.1080405@gmx.net \
    --to=sensille@gmx.net \
    --cc=ablock84@googlemail.com \
    --cc=jbacik@fusionio.com \
    --cc=linux-btrfs@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).