From: Jens Axboe <axboe@kernel.dk>
To: Christoph Hellwig <hch@infradead.org>
Cc: snitzer@redhat.com, linux-block@vger.kernel.org, dm-devel@redhat.com
Subject: Re: xfstests generic/347 seems unhappy on todays block for-next tree
Date: Mon, 10 Dec 2018 15:40:05 -0700 [thread overview]
Message-ID: <36632a47-3bc6-2d71-d7f5-3de5ea64b151@kernel.dk> (raw)
In-Reply-To: <0742acda-f5eb-9d1a-a368-a30c43c56c13@kernel.dk>
On 12/10/18 3:36 PM, Jens Axboe wrote:
> On 12/10/18 3:09 PM, Jens Axboe wrote:
>> On 12/10/18 3:00 PM, Jens Axboe wrote:
>>> On 12/10/18 2:53 PM, Christoph Hellwig wrote:
>>>> On Mon, Dec 10, 2018 at 02:39:39PM -0700, Jens Axboe wrote:
>>>>> On 12/10/18 2:37 PM, Christoph Hellwig wrote:
>>>>>> This test is described as:
>>>>>>
>>>>>> # Test very basic thin device usage, exhaustion, and growth
>>>>>
>>>>> Does that tree have:
>>>>>
>>>>> commit c616cbee97aed4bc6178f148a7240206dcdb85a6
>>>>> Author: Jens Axboe <axboe@kernel.dk>
>>>>> Date: Thu Dec 6 22:17:44 2018 -0700
>>>>>
>>>>> blk-mq: punt failed direct issue to dispatch list
>>>>>
>>>>> ?
>>>>
>>>> yes.
>>>>
>>>> The latest commit is 6f75723190d88e1319bea623bfe0292bf3917965
>>>
>>> Reproduces here, guessing it's the inflight counters... Trying without.
>>
>> Yep, works without the inflight changes. Deferring to Mike to sort
>> this one out.
>
> I think this should work much better...
We can improve upon that, we don't need to ever read the inflight
counter from IO completion. Testing this one now.
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 70568f8b6c53..79ad4b3d215c 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -650,14 +650,14 @@ static bool md_in_flight(struct mapped_device *md)
{
int cpu;
struct hd_struct *part = &dm_disk(md)->part0;
+ long sum = 0;
for_each_possible_cpu(cpu) {
- if (part_stat_local_read_cpu(part, in_flight[0], cpu) ||
- part_stat_local_read_cpu(part, in_flight[1], cpu))
- return true;
+ sum += part_stat_local_read_cpu(part, in_flight[0], cpu);
+ sum += part_stat_local_read_cpu(part, in_flight[1], cpu);
}
- return false;
+ return sum != 0;
}
static void start_io_acct(struct dm_io *io)
@@ -691,10 +691,8 @@ static void end_io_acct(struct dm_io *io)
true, duration, &io->stats_aux);
/* nudge anyone waiting on suspend queue */
- if (unlikely(waitqueue_active(&md->wait))) {
- if (!md_in_flight(md))
- wake_up(&md->wait);
- }
+ if (unlikely(waitqueue_active(&md->wait)))
+ wake_up(&md->wait);
}
/*
--
Jens Axboe
prev parent reply other threads:[~2018-12-10 22:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-10 21:37 xfstests generic/347 seems unhappy on todays block for-next tree Christoph Hellwig
2018-12-10 21:39 ` Jens Axboe
2018-12-10 21:53 ` Christoph Hellwig
2018-12-10 22:00 ` Jens Axboe
2018-12-10 22:09 ` Jens Axboe
2018-12-10 22:36 ` Jens Axboe
2018-12-10 22:40 ` Jens Axboe [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=36632a47-3bc6-2d71-d7f5-3de5ea64b151@kernel.dk \
--to=axboe@kernel.dk \
--cc=dm-devel@redhat.com \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--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 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).