From patchwork Fri Jun 24 13:40:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Pen X-Patchwork-Id: 9197535 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 40C6E60754 for ; Fri, 24 Jun 2016 13:55:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EFDF28481 for ; Fri, 24 Jun 2016 13:55:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2002E284B3; Fri, 24 Jun 2016 13:55:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 31B5828481 for ; Fri, 24 Jun 2016 13:55:09 +0000 (UTC) Received: from localhost ([::1]:43687 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGRZc-0006iL-BJ for patchwork-qemu-devel@patchwork.kernel.org; Fri, 24 Jun 2016 09:55:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGRLM-0006zT-IP for qemu-devel@nongnu.org; Fri, 24 Jun 2016 09:40:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGRLH-0003pQ-Ac for qemu-devel@nongnu.org; Fri, 24 Jun 2016 09:40:23 -0400 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]:36494) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGRLH-0003pE-2f for qemu-devel@nongnu.org; Fri, 24 Jun 2016 09:40:19 -0400 Received: by mail-wm0-x230.google.com with SMTP id f126so22977688wma.1 for ; Fri, 24 Jun 2016 06:40:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=profitbricks-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=FAf0hv5yvv4TpRRhsHqRtPv6hwteJUcKw5orkv8jtpw=; b=NhP0CQlK2vM0QyUzvp7qOAM56ruf7/nhPqZ61MiWgtR0OwGiUHdG1if3smCZla+S7x AC9qJ24D7W2MXwHsu1ywwXXdJpgdc4eAG+WAOXfhVQ3cXbLm8t+1F3D2PunIFHSuXBaR vObR8Ebe/f/s9Z3MksXO8KU3zZymC9v3CS55yFe9bvymsYUug71UdaOkbkDzqjxeU1rZ LujqP7xwc3GTIvDc/hIolaFN4dlLo8jrKcMNRxdMJ6AWpEWdRfvRu7U2QmLpOG2nWKEZ f526/W19GScrdeh+83uyAeB7lRjXXnu3dky8q8SheINz+ExJiSMUGGXr1AosJ1VyZbUX 02Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=FAf0hv5yvv4TpRRhsHqRtPv6hwteJUcKw5orkv8jtpw=; b=mW7TxFN1C2O1cU29A9vfXC4ph6mZ5GJYSHbCozE16BZ8JusvXyc/NS6rTRv78OCDAc EzcONKaJDPuttj4aEgfdWXu57+pH0ugeL68fSE1nSlfF/QkFsi4e1xG/JWXizx+mQiNd cyLOPvHsfKXdYxAGgYV5st0KKo79BqQGPBpmNlKglQMzEBCnikcxBGeA1oif10dlDcqh CKIi/V+bc4c9ELCRtP7xi5/htC6cpAErhdHy6sBgD6r6xZQkKlltrjsejRk7ZZVZDUwD cxR5KBgSRiJyLgjvjGpSr3AccQUrMk5d7Az0OQHabmH5WC8Ov90T4KSNZjRRc0usPTsU S/Ww== X-Gm-Message-State: ALyK8tL1gOwxifIc0Yc4KxkaWDkZyrLs4rW3hzNpPkNLxFZ+FGAECxU2JX8NjQ3lVnfJ33TV X-Received: by 10.28.54.147 with SMTP id y19mr6036908wmh.68.1466775618160; Fri, 24 Jun 2016 06:40:18 -0700 (PDT) Received: from pb.pb.local ([62.217.45.26]) by smtp.gmail.com with ESMTPSA id bu7sm5183077wjc.42.2016.06.24.06.40.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Jun 2016 06:40:17 -0700 (PDT) From: Roman Pen To: Date: Fri, 24 Jun 2016 15:40:08 +0200 Message-Id: <1466775608-31052-1-git-send-email-roman.penyaev@profitbricks.com> X-Mailer: git-send-email 2.8.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::230 Subject: [Qemu-devel] [PATCH 1/1] Revert "linux-aio: Cancel BH if not needed" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Paolo Bonzini , Stefan Hajnoczi , Roman Pen , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This reverts commit ccb9dc10129954d0bcd7814298ed445e684d5a2a, which causes MQ stuck while doing IO thru virtio_blk. I reproduce very easily this stuck on recent v4 Stefan's set using num-queues=4: "[PATCH v4 0/7] virtio-blk: multiqueue support" https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg05999.html Some debug output from guest: ----------------------------- [root@andbd-vm ~]# cat /sys/block/vda/inflight 106 98 [root@andbd-vm ~]# cat /sys/block/vda/mq/*/tags nr_tags=128, reserved_tags=0, bits_per_word=5 nr_free=89, nr_reserved=0 active_queues=0 nr_tags=128, reserved_tags=0, bits_per_word=5 nr_free=83, nr_reserved=0 active_queues=0 nr_tags=128, reserved_tags=0, bits_per_word=5 nr_free=31, nr_reserved=0 active_queues=0 nr_tags=128, reserved_tags=0, bits_per_word=5 nr_free=105, nr_reserved=0 active_queues=0 Fio configuration: ------------------ [global] description=Emulation of Storage Server Access Pattern bssplit=512/20:1k/16:2k/9:4k/12:8k/19:16k/10:32k/8:64k/4 fadvise_hint=0 rw=randrw:2 direct=1 ioengine=libaio iodepth=64 iodepth_batch_submit=64 iodepth_batch_complete=64 numjobs=8 gtod_reduce=1 group_reporting=1 time_based=1 runtime=30 [job] filename=/dev/vda VM configuration: ----------------- -object iothread,id=t0 \ -drive if=none,id=d0,file=/dev/nullb0,format=raw,snapshot=off,cache=none,aio=native \ -device virtio-blk-pci,drive=d0,iothread=t0,num-queues=4,disable-modern=off,disable-legacy=on \ Signed-off-by: Roman Pen Cc: Kevin Wolf Cc: Paolo Bonzini Cc: Stefan Hajnoczi Cc: qemu-devel@nongnu.org --- block/linux-aio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/block/linux-aio.c b/block/linux-aio.c index e468960..fe7cece 100644 --- a/block/linux-aio.c +++ b/block/linux-aio.c @@ -149,8 +149,6 @@ static void qemu_laio_completion_bh(void *opaque) if (!s->io_q.plugged && !QSIMPLEQ_EMPTY(&s->io_q.pending)) { ioq_submit(s); } - - qemu_bh_cancel(s->completion_bh); } static void qemu_laio_completion_cb(EventNotifier *e) @@ -158,7 +156,7 @@ static void qemu_laio_completion_cb(EventNotifier *e) LinuxAioState *s = container_of(e, LinuxAioState, e); if (event_notifier_test_and_clear(&s->e)) { - qemu_laio_completion_bh(s); + qemu_bh_schedule(s->completion_bh); } }