From nobody Sun Feb 8 19:02:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1602691108; cv=none; d=zohomail.com; s=zohoarc; b=LttOmDB1bRzsNBqvOlllKG6GJE9091ct9q1p/izVyiYKPLrAsmY4TEOdRbMltlu9F0cI3ohOsqW4fX+Bnml7FbmNuWVVikkZNF6WTywsQgO+sdDbECXPcuu4CKsIunEfzEhmyZgFZ+9vJ8AoPzMBS7LwX7mRFQhSVy4VQ4mx3/I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602691108; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=JeYSuq0H+8peHPSJMmoLpbQOjUcL6gucQf6bz7s5d5I=; b=VRjLPKq/296w5M2LSmQUI4zzTFLUOr1my95MsbzIzdAa0oMLjsp+31mrADBxp5gBLdAMtqyWAsbDDqqbKPN4mJbwK/ygsHom5HEufvocPFy6Bx2sjLi8qcQQJmeTKMGOYTAMqsLGRS0DnZGEC2NYWI4Wma3gi0SlpeCPs2pARdc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1602691108929153.4725174581073; Wed, 14 Oct 2020 08:58:28 -0700 (PDT) Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-105-U41USDFUPICJL_OCquIrig-1; Wed, 14 Oct 2020 11:58:24 -0400 Received: by mail-wm1-f69.google.com with SMTP id z7so9351wmi.3 for ; Wed, 14 Oct 2020 08:58:23 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (106.red-83-59-162.dynamicip.rima-tde.net. [83.59.162.106]) by smtp.gmail.com with ESMTPSA id a199sm135830wmd.8.2020.10.14.08.58.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2020 08:58:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602691106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JeYSuq0H+8peHPSJMmoLpbQOjUcL6gucQf6bz7s5d5I=; b=LUg4VuHbQtmlnev76ykquHgbTWD+0EYmSGaKpUmj7ZMBb1dxK+tCE6Kc4dg0LDy7njBjFq 7Wl26EEDc0wNDX6qlX45TMj1sY1HIjtKbI4yfCDWk7AZteHRtEFHUlvlG6DKf4xkelTSAs lhl0Q+TIFOQdFYReA/q/uHVeMH0IbMc= X-MC-Unique: U41USDFUPICJL_OCquIrig-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JeYSuq0H+8peHPSJMmoLpbQOjUcL6gucQf6bz7s5d5I=; b=RvQwluvjW/ZrrOvx7F4LhrZtQ/pMnx2efpRQ1wq8ZZWvToW0qEBOGQJpSsBNc3dMC3 H4loGoI9/jWDxWqx5DBIz5FeiT/wB33jPFUZxCd91E/xGvBX0DoWklfPv8f6xfPIxvfO 7+2XLDYR3L1IXXTXKKHHxA9B++IJfJThTZZy/uTAzaQxjGr+zhTQMy7PIeYuGTAnjznF vrTN7u3AzzlSS+1GgCSI6cnB70GANQgBXjbeEherhPdAn1swjN58juNxPWsOkVV4ob6b ngXjqW6pSJVfMMpVeczIm3m57siAHwdQPdDVZahT0c4/oUjto256ifhvc+E/OTB0fp/n JF8Q== X-Gm-Message-State: AOAM530gVbItkjQIZzuNi6ReftyTdq9GL/vua2fQ6Rypu+w1NoZyUgYs DJSMmGlpy8qd7a5YQ5nJr8EOy7NQQTzoycj8IaEBOF6AUS5OZovuGfuR1rstUScGllBMwzx4cJh Mtbqgo9qV5+XMYg== X-Received: by 2002:a1c:f417:: with SMTP id z23mr87594wma.57.1602691102846; Wed, 14 Oct 2020 08:58:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzR60g/fSQn3Nj8owevItZNx/z8AFsCZ5ovI0u8RwaA8S/Ehr08qjvVfjbS+y0l+iyfHRazlA== X-Received: by 2002:a1c:f417:: with SMTP id z23mr87577wma.57.1602691102654; Wed, 14 Oct 2020 08:58:22 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Fam Zheng , Stefan Hajnoczi , Kevin Wolf , Max Reitz , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 02/15] block/nvme: Trace nvme_poll_queue() per queue Date: Wed, 14 Oct 2020 17:57:57 +0200 Message-Id: <20201014155810.102841-3-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201014155810.102841-1-philmd@redhat.com> References: <20201014155810.102841-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) As we want to enable multiple queues, report the event in each nvme_poll_queue() call, rather than once in the callback calling nvme_poll_queues(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- block/nvme.c | 2 +- block/trace-events | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/block/nvme.c b/block/nvme.c index a534c61b6b6..7c253eafa7f 100644 --- a/block/nvme.c +++ b/block/nvme.c @@ -585,6 +585,7 @@ static bool nvme_poll_queue(NVMeQueuePair *q) const size_t cqe_offset =3D q->cq.head * NVME_CQ_ENTRY_BYTES; NvmeCqe *cqe =3D (NvmeCqe *)&q->cq.queue[cqe_offset]; =20 + trace_nvme_poll_queue(q->s, q->index); /* * Do an early check for completions. q->lock isn't needed because * nvme_process_completion() only runs in the event loop thread and @@ -633,7 +634,6 @@ static bool nvme_poll_cb(void *opaque) BDRVNVMeState *s =3D container_of(e, BDRVNVMeState, irq_notifier[MSIX_SHARED_IRQ_IDX]); =20 - trace_nvme_poll_cb(s); return nvme_poll_queues(s); } =20 diff --git a/block/trace-events b/block/trace-events index 0e351c3fa3d..fa50af6b6f3 100644 --- a/block/trace-events +++ b/block/trace-events @@ -143,7 +143,7 @@ nvme_complete_command(void *s, int index, int cid) "s %= p queue %d cid %d" nvme_submit_command(void *s, int index, int cid) "s %p queue %d cid %d" nvme_submit_command_raw(int c0, int c1, int c2, int c3, int c4, int c5, in= t c6, int c7) "%02x %02x %02x %02x %02x %02x %02x %02x" nvme_handle_event(void *s) "s %p" -nvme_poll_cb(void *s) "s %p" +nvme_poll_queue(void *s, unsigned q_index) "s %p q #%u" nvme_prw_aligned(void *s, int is_write, uint64_t offset, uint64_t bytes, i= nt flags, int niov) "s %p is_write %d offset %"PRId64" bytes %"PRId64" flag= s %d niov %d" nvme_write_zeroes(void *s, uint64_t offset, uint64_t bytes, int flags) "s = %p offset %"PRId64" bytes %"PRId64" flags %d" nvme_qiov_unaligned(const void *qiov, int n, void *base, size_t size, int = align) "qiov %p n %d base %p size 0x%zx align 0x%x" --=20 2.26.2