From nobody Mon Feb 9 08:57:04 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=1603964022; cv=none; d=zohomail.com; s=zohoarc; b=cBk2NpPkf1+Ydu75KjZxxH7d5xlWlv1ufWSylcUnqFZFhdClUXuxVp6LcwJy9bIco7/xYCrZGPgUi5KsjegMfJyebF7eFL88CfoRoys33NjKIUgxPUiy18j5Ls38PP3MsBCahZC8pQOCmt8kdRLDQA/tOAzNXSyzwi7EsnWn8TA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603964022; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=cs1C0obG4nToPrEZSg1uNXVjaS/D+BwTncjleFbCDLw=; b=KmLrQ16ab+pL5UvOMX8DxOnhlrWZQdk9Z5rd6ZwdiDOXSxAqIQKe8cB9dH7FpO46emxBTSy87Art2QB/yP0aaGEC3H/KO4qsVqJq7f8wXbnh5MASWBJe1JfviqZjZ9A4Ug5Jxb4G6Lpsbub8ydhKxH6CbgAed/HLClmY4zxZlZs= 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 1603964022801384.6464088348664; Thu, 29 Oct 2020 02:33:42 -0700 (PDT) Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-459-nl-jHuBwO7aZ123vaGqDWw-1; Thu, 29 Oct 2020 05:33:37 -0400 Received: by mail-ej1-f72.google.com with SMTP id b17so929292ejb.20 for ; Thu, 29 Oct 2020 02:33:37 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (234.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.234]) by smtp.gmail.com with ESMTPSA id d24sm1163692edq.34.2020.10.29.02.33.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2020 02:33:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603964021; 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=cs1C0obG4nToPrEZSg1uNXVjaS/D+BwTncjleFbCDLw=; b=bPa57C0/jDxvyyRIZnFb5WmL3M48Ize6sVvdGl3irDLek8o8FpE2iawWbsLE4q9RGq1zMk gkrfv+NR9QbP2w3G1Y5JJbAnTc3CdKOhPaRK8r9abtbIr+unMROforwz+4xfW4tyBxEEL1 m6OsEwi4idvBp5n0fFHx7g0TKzv1XKI= X-MC-Unique: nl-jHuBwO7aZ123vaGqDWw-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=cs1C0obG4nToPrEZSg1uNXVjaS/D+BwTncjleFbCDLw=; b=Gmii8b1775YbmkFY2dYif4+/ZrpCBhwuUWRI4prPJtx2fkcosi0HowT/L/uKLpZkh9 X3ZwCuMSngIU3Q5vZrn9giPfROvOYdxV+x1QtXPNQ50PpiI2OmmRJNoVls7gJ1NTwDnT wU1F49lGv5r/WZeXEgOrWxVI+OMvE/M3j2OceQeTHfZ2Myp1gf3dV42FOhTmXgzY7SpX IAmb6+sehH4i9pJ8wL8SEDkqJGCgdBI+8wmAKlMdXHOXUeS8JB33Y4Z0Zs77120z0+sF tu3ve9QzznNGMVdmVrGWHji/RYdgkrVSJza6lezrvgiuMY/kOcwc8YPY9Y2Skkd7Ozrm 4vfQ== X-Gm-Message-State: AOAM530jFEeU60oQK/4svFO46JRnrHxBhwvzc6Nyp/74AbSF+WbLdjk/ Whg2xrdcfGKhyc5cBIQelvL7bid7QmsMjd8GNVGx7m3fWQbOWt1J1GHEH/uPCBzIuzNKuZC7NFL G4+pGnEtfjEaGRg== X-Received: by 2002:a17:906:1989:: with SMTP id g9mr1528544ejd.62.1603964016494; Thu, 29 Oct 2020 02:33:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBI0FYASgwJnrVETq5oEFCOqMrX+j4zrUx/mZmzqhHhAAQ31wYwUzNeRp/NjdnFvFxuh3Xjg== X-Received: by 2002:a17:906:1989:: with SMTP id g9mr1528523ejd.62.1603964016282; Thu, 29 Oct 2020 02:33:36 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Stefan Hajnoczi , Kevin Wolf , Klaus Jensen , Eric Auger , Max Reitz , Fam Zheng , Keith Busch , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-5.2 v2 05/25] block/nvme: Trace nvme_poll_queue() per queue Date: Thu, 29 Oct 2020 10:32:46 +0100 Message-Id: <20201029093306.1063879-6-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201029093306.1063879-1-philmd@redhat.com> References: <20201029093306.1063879-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(). Reviewed-by: Eric Auger Reviewed-by: Stefan Hajnoczi Tested-by: Eric Auger 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 361b5772b7a..8d74401ae7a 100644 --- a/block/nvme.c +++ b/block/nvme.c @@ -594,6 +594,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 @@ -684,7 +685,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 b90b07b15fa..86292f3312b 100644 --- a/block/trace-events +++ b/block/trace-events @@ -145,7 +145,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 0x%"PRIx64" bytes %"PRId64" fl= ags %d niov %d" nvme_write_zeroes(void *s, uint64_t offset, uint64_t bytes, int flags) "s = %p offset 0x%"PRIx64" 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