Received: by 10.223.164.202 with SMTP id h10csp4280854wrb; Mon, 20 Nov 2017 12:53:15 -0800 (PST) X-Google-Smtp-Source: AGs4zMY65AzMYR725zPJ/TBi5nYPAjDLcwOjwJO1IaHGTQVtjQ+PL0FtneOfTuO9OX8niABvYtwG X-Received: by 10.84.176.3 with SMTP id u3mr1988619plb.242.1511211195111; Mon, 20 Nov 2017 12:53:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511211195; cv=none; d=google.com; s=arc-20160816; b=vJtQGlEJ8Sp5HCbN6nnMVuWirrM+HNNosQtBd4W9ccxe0gwd+qfCls2TXIBxLViaSu iMweyHx0kQ55XjzIFysxZSc74lPpHmPeAwCg2YKP67J6j1OvHMqoxV2Ds7vfccl+cb8G dXJyLCDpU/8ICHomzIadA3zHzJfZXkSsVfhnS6oyhS4aXdjdixqwkbxITgY4oKM1fn03 aIVJWsHy4zweRUVclbKs5YHkuahU5zPsSqK/XDcDeCGfigBTz7m0XEGfW52fHMhNCMnl rCvHY/NpXMY3TLAje8MDuEVMseM3DdDlo7KbP83yBx1SkRuUa4X/dTznILRf7woDNTd4 tAow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature :arc-authentication-results; bh=QTi+AbqhyFRhBabTJTpykDxqbKQ21ozDosPKBxYn+cY=; b=gpghauV1Qw2xLIMZOAvRA7WGPNPiayrH6WaVdIR/qDpAaRu0hV+CAupF2UehzpPdOt aMrDQc3KL2MCaokg+tAImFHk8nF99Nmze9pBlOFicBkYvqgfYHox++a8p85MxTbaexIK YdxJmXdDU/VuwyiLLKAa+aQdK4hFwoNZiDiFwxGjwig+eL7VnZs1EIqXUN+OScZjEHyJ Q4j6nG+WDy0xGQpFJfSMFLEnPXu0yLR+n0PqTDYKjcPxUga/4F5ZEzT9rJtXR50g9Hvz ih7K0sb1coxs6qECdm61wAi2uib/26auzibbYW2lftNKNH5CLduljXgSUIc4fsEbPt5V kBWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=ieub+nue; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f14si8931426pgr.65.2017.11.20.12.53.05; Mon, 20 Nov 2017 12:53:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=ieub+nue; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752924AbdKTUwT (ORCPT + 67 others); Mon, 20 Nov 2017 15:52:19 -0500 Received: from mail-it0-f44.google.com ([209.85.214.44]:41236 "EHLO mail-it0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752896AbdKTUwQ (ORCPT ); Mon, 20 Nov 2017 15:52:16 -0500 Received: by mail-it0-f44.google.com with SMTP id x28so13614371ita.0 for ; Mon, 20 Nov 2017 12:52:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=QTi+AbqhyFRhBabTJTpykDxqbKQ21ozDosPKBxYn+cY=; b=ieub+nueWc34T7999Uxh3IVbV13kwvD6Omq6QQDqR+4HuQrFgKZNqJfDCBZYufy7nO Y3vK5n9aRxbKzt4oj4UNXB+fBXD0a9q1A/0HEXh7UEIjneNln8jOasIaqFE6EPFEyvMV BX95WU/OVPYyEpXV0tqud8dmLCC45JMtz91xKcRMDLa9jp53/2a7aesNSPCoqgl//Myo 42vbK9ocMEfRZ2feYe4mZicSNiOu+Zti7o2rSXofqstzEe4XaIJRPwF+7cdhDHdBMJ4l Wj6XzjPnWRT0nFyIfQ3IqIcMxY7kfGlXKotxppgt0+gflO0gDoPDWZ1Ha1saUwi2aRv2 Mymg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=QTi+AbqhyFRhBabTJTpykDxqbKQ21ozDosPKBxYn+cY=; b=l4q66JWfINCdSA2zem4IuLZJmPyeRhuF4K+Q/qqwdqKZpLw8DkIOLgwukQQ0Nf3iwE DpMEN0+oOgXrMvkrwREbwqfBHjQ565CtU+OIPu+tDTNWj4ywapGZrrjAvmUO+jOeO0gg WlJLhDu02jre00+atQKUmawLn2mJYtZ+/qojPyE6720jJLoVyTUm9U/Sv6cOeNUIkF+/ oXhJ9TMROT6+l63uAlmAgDBeKVRmP1Ihxze4sLd3s9H6Uk9S5dxkvCAKxmh8s3D0GQTs NhIWw7+1NixU+3UYTjznBVXxrnyN44+PSaGWG9U2HYlTM512kj9wonG512t7IjlyoUx/ fUDw== X-Gm-Message-State: AJaThX5eWershW7er71Gn+/rDrbfkc2d/3Xj5udRc+U4ksrbRSMBT7vc DumwTNtlKybaKc8c9rKtdbtPBzVQIrE= X-Received: by 10.36.10.18 with SMTP id 18mr16657142itw.21.1511211135712; Mon, 20 Nov 2017 12:52:15 -0800 (PST) Received: from [192.168.1.160] ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id d1sm5353758iti.35.2017.11.20.12.52.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Nov 2017 12:52:15 -0800 (PST) Subject: Re: 4.14: WARNING: CPU: 4 PID: 2895 at block/blk-mq.c:1144 with virtio-blk To: Christian Borntraeger , Bart Van Assche , "virtualization@lists.linux-foundation.org" , "linux-block@vger.kernel.org" , "mst@redhat.com" , "jasowang@redhat.com" , "linux-kernel@vger.kernel.org" References: <9c5eec5d-f542-4d76-6933-6fe31203ce09@de.ibm.com> <1511205644.2396.32.camel@wdc.com> <04526c98-ffc5-1eca-3aa8-50f9212c4323@de.ibm.com> <5c9f2228-0a8b-8225-7038-e6cb3f31ca0b@kernel.dk> <2e44dbd3-2f90-c267-560c-91d1d4b0e892@de.ibm.com> From: Jens Axboe Message-ID: <823b9dd5-7781-5a72-03ff-bc931433fc19@kernel.dk> Date: Mon, 20 Nov 2017 13:52:14 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <2e44dbd3-2f90-c267-560c-91d1d4b0e892@de.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 From 1584619656266020129@xxx Mon Nov 20 20:51:07 +0000 2017 X-GM-THRID: 1584619656266020129 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread