Linux virtualization list
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Christian Borntraeger <borntraeger@de.ibm.com>,
	Bart Van Assche <Bart.VanAssche@wdc.com>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"mst@redhat.com" <mst@redhat.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: 4.14: WARNING: CPU: 4 PID: 2895 at block/blk-mq.c:1144 with virtio-blk
Date: Mon, 20 Nov 2017 13:52:14 -0700	[thread overview]
Message-ID: <823b9dd5-7781-5a72-03ff-bc931433fc19@kernel.dk> (raw)
In-Reply-To: <2e44dbd3-2f90-c267-560c-91d1d4b0e892@de.ibm.com>

On 11/20/2017 01:49 PM, Christian Borntraeger wrote:
> 
> 
> On 11/20/2017 08:42 PM, Jens Axboe wrote:
>> On 11/20/2017 12:29 PM, Christian Borntraeger wrote:
>>>
>>>
>>> On 11/20/2017 08:20 PM, Bart Van Assche wrote:
>>>> On Fri, 2017-11-17 at 15:42 +0100, Christian Borntraeger wrote:
>>>>> This is 
>>>>>
>>>>> b7a71e66d (Jens Axboe                2017-08-01 09:28:24 -0600 1141)     * are mapped to it.
>>>>> b7a71e66d (Jens Axboe                2017-08-01 09:28:24 -0600 1142)     */
>>>>> 6a83e74d2 (Bart Van Assche           2016-11-02 10:09:51 -0600 1143)    WARN_ON(!cpumask_test_cpu(raw_smp_processor_id(), hctx->cpumask) &&
>>>>> 6a83e74d2 (Bart Van Assche           2016-11-02 10:09:51 -0600 1144)            cpu_online(hctx->next_cpu));
>>>>> 6a83e74d2 (Bart Van Assche           2016-11-02 10:09:51 -0600 1145) 
>>>>> b7a71e66d (Jens Axboe                2017-08-01 09:28:24 -0600 1146)    /*
>>>>
>>>> Did you really try to figure out when the code that reported the warning
>>>> was introduced? I think that warning was introduced through the following
>>>> commit:
>>>
>>> This was more a cut'n'paste to show which warning triggered since line numbers are somewhat volatile.
>>>
>>>>
>>>> commit fd1270d5df6a005e1248e87042159a799cc4b2c9
>>>> Date:   Wed Apr 16 09:23:48 2014 -0600
>>>>
>>>>     blk-mq: don't use preempt_count() to check for right CPU
>>>>      
>>>>     UP or CONFIG_PREEMPT_NONE will return 0, and what we really
>>>>     want to check is whether or not we are on the right CPU.
>>>>     So don't make PREEMPT part of this, just test the CPU in
>>>>     the mask directly.
>>>>
>>>> Anyway, I think that warning is appropriate and useful. So the next step
>>>> is to figure out what work item was involved and why that work item got
>>>> executed on the wrong CPU.
>>>
>>> It seems to be related to virtio-blk (is triggered by fio on such disks). Your comment basically
>>> says: "no this is not a known issue" then :-)
>>> I will try to take a dump to find out the work item
>>
>> blk-mq does not attempt to freeze/sync existing work if a CPU goes away,
>> and we reconfigure the mappings. So I don't think the above is unexpected,
>> if you are doing CPU hot unplug while running a fio job.
> 
> I did a cpu hot plug (adding a CPU) and I started fio AFTER that.

OK, that's different, we should not be triggering a warning for that.
What does your machine/virtblk topology look like in terms of CPUS,
nr of queues for virtblk, etc?

You can probably get this info the easiest by just doing a:

# find /sys/kernel/debug/block/virtX

replace virtX with your virtblk device name. Generate this info both
before and after the hotplug event.

>> While it's a bit annoying that we trigger the WARN_ON() for a condition
>> that can happen, we're basically interested in it if it triggers for
>> normal operations.
> 
> I think we should never trigger a WARN_ON on conditions that can
> happen. I know some folks enabling panic_on_warn to detect/avoid data
> integrity issues. FWIW, this also seems to happen wit 4.13 and 4.12

It's not supposed to happen for your case, so I'd say it's been useful.
It's not a critical thing, but it is something that should not trigger
and we need to look into why it did, and fixing it up.

-- 
Jens Axboe

  parent reply	other threads:[~2017-11-20 20:52 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9c5eec5d-f542-4d76-6933-6fe31203ce09@de.ibm.com>
2017-11-20 19:20 ` 4.14: WARNING: CPU: 4 PID: 2895 at block/blk-mq.c:1144 with virtio-blk Bart Van Assche
     [not found] ` <1511205644.2396.32.camel@wdc.com>
2017-11-20 19:29   ` Christian Borntraeger
     [not found]   ` <04526c98-ffc5-1eca-3aa8-50f9212c4323@de.ibm.com>
2017-11-20 19:42     ` Jens Axboe
     [not found]     ` <5c9f2228-0a8b-8225-7038-e6cb3f31ca0b@kernel.dk>
2017-11-20 20:49       ` Christian Borntraeger
     [not found]       ` <2e44dbd3-2f90-c267-560c-91d1d4b0e892@de.ibm.com>
2017-11-20 20:52         ` Jens Axboe [this message]
2017-11-21  8:35           ` Christian Borntraeger
2017-11-21  9:50             ` Christian Borntraeger
     [not found]             ` <15f232d2-2aaa-df7c-57e8-2f710e051e84@de.ibm.com>
2017-11-21 10:14               ` 4.14: WARNING: CPU: 4 PID: 2895 at block/blk-mq.c:1144 with virtio-blk (also 4.12 stable) Christian Borntraeger
     [not found]               ` <c8bd769e-9742-205d-11b0-469428a8579c@de.ibm.com>
2017-11-21 17:27                 ` Jens Axboe
     [not found]                 ` <b7b3cf4b-837e-f9ba-61c0-4f9ddd8b9a95@kernel.dk>
2017-11-21 18:09                   ` Jens Axboe
2017-11-21 18:12                     ` Christian Borntraeger
     [not found]                     ` <1aeecf2e-a68e-4c18-5912-2473f457e6ea@de.ibm.com>
2017-11-21 18:27                       ` Jens Axboe
2017-11-21 18:39                         ` Jens Axboe
2017-11-21 19:15                           ` Christian Borntraeger
     [not found]                           ` <ba994ec6-8db6-f77e-ac73-92e3f6b0135a@de.ibm.com>
2017-11-21 19:30                             ` Jens Axboe
     [not found]                             ` <ae02b9c5-9a2e-cb8b-7828-475b3c0b1cb9@kernel.dk>
2017-11-21 20:12                               ` Christian Borntraeger
     [not found]                               ` <c438db5f-f4f1-69f8-37f3-e91eae29fa25@de.ibm.com>
2017-11-21 20:14                                 ` Jens Axboe
2017-11-21 20:19                                   ` Christian Borntraeger
     [not found]                                   ` <276625a9-44fb-719d-9281-caacefdbb99f@de.ibm.com>
2017-11-21 20:21                                     ` Jens Axboe
     [not found]                                     ` <eceae481-cf9a-0429-7a15-c363a8e7bc2a@kernel.dk>
2017-11-21 20:31                                       ` Christian Borntraeger
     [not found]                                       ` <1ddd1cd4-2862-849e-7849-82544bcb86be@de.ibm.com>
2017-11-21 20:39                                         ` Jens Axboe
     [not found]                                         ` <08e6f35a-4f49-973e-99f7-6087b44337c4@kernel.dk>
2017-11-22  7:28                                           ` Christoph Hellwig
     [not found]                                           ` <20171122072857.GA19338@lst.de>
2017-11-22 14:46                                             ` Jens Axboe
2017-11-23 14:02                       ` Christoph Hellwig
     [not found]                       ` <20171123140208.GA28914@lst.de>
2017-11-23 14:08                         ` Christoph Hellwig
2017-11-17 14:42 4.14: WARNING: CPU: 4 PID: 2895 at block/blk-mq.c:1144 with virtio-blk Christian Borntraeger

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=823b9dd5-7781-5a72-03ff-bc931433fc19@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=Bart.VanAssche@wdc.com \
    --cc=borntraeger@de.ibm.com \
    --cc=jasowang@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.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