From: Nikolay Borisov <n.borisov.lkml@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: Deadlock between block allocation and block truncation
Date: Thu, 13 Apr 2017 16:52:03 +0300 [thread overview]
Message-ID: <af73ca2f-5840-1399-9902-8f7482e29e49@gmail.com> (raw)
In-Reply-To: <20170412161017.GA16590@infradead.org>
On 12.04.2017 19:10, Christoph Hellwig wrote:
> Hi Nikolay,
>
> I guess the culprit is that truncate can free up to two extents in
> the same transaction and thus try to lock two different AGs without
> requiring them to be in increasing order.
>
> Does the one liner below fix the problem for you?
So after 200 runs of generic/299 I didn't hit the deadlock whereas
before it would hit in the first 30 or so. FWIW :
Tested-by: Nikolay Borisov <nborisov@suse.com>
On a different note - do you think that reducing the unmapped extents
from 2 to 1 would introduce any performance degradation during
truncation? Looking around the code this define is only used when doing
truncation, so perhaps a better thing to do would be to turn this
xfs_bunmapi arg to a boolean which signal whether we are doing
truncation or not. And if it is set to true have xfs_bunmapi unmap all
possible extents from only a single AG? I'm going to sift through the
git history to figure out where this requirement of maximum 2 extent
came to truncate, came.
Regards,
Nikolay
next prev parent reply other threads:[~2017-04-13 13:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-12 15:51 Deadlock between block allocation and block truncation Nikolay Borisov
2017-04-12 16:10 ` Christoph Hellwig
2017-04-12 16:12 ` Nikolay Borisov
2017-04-12 16:20 ` Christoph Hellwig
2017-04-12 17:44 ` Nikolay Borisov
2017-04-12 17:57 ` Christoph Hellwig
2017-04-13 13:52 ` Nikolay Borisov [this message]
2017-04-14 7:42 ` Christoph Hellwig
2017-04-25 7:36 ` Christoph Hellwig
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=af73ca2f-5840-1399-9902-8f7482e29e49@gmail.com \
--to=n.borisov.lkml@gmail.com \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.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