[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v3 6/6] xen: pci: print reference counter when dumping pci_devs


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Date: Tue, 14 Mar 2023 20:56:30 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xaQsE3qqfsC6jF/uvxz8iK+gfBz0ZgRCtEGe75+aN/A=; b=XNLgugBkLKiBe/rSZil8+ySzIuZRqGQ2OqKj+SV/XXbrNK9j3YG2MZ9XHkTsYu7ZUda++RObufDo0xraBDbrodJMnBPVJq60AG84+FabmSGz1emz4CGJQBE5Q91be70Gqgw0t228vMcBKdIl/gXCU7FWkBRFAjY6lwqlcU9HgiOEp4PeRQbxxPsvrQQk2AVOvCirDFXHOHxbu8V4a+rWzbKkxH9AlMf+YcxZnaL1bcCtm4NNcATI08bMB/c3y2U071zfRYSjf6mP0QFWLdJQIVijtQWOL/VL6gXZncytG5y3gTLap8m9E6Gs0Ri61rWVw6JNW48tfKkS927WP2zgLw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mXcNR+EGVCiTxLHxLV3tWW7NBXi9iMnOsCAGFKzSDxvXZ2gHg2XlA/HvF0xVYiX3fAm8fmsysSLPIdVdBUtnSD1tMV4ZY7EhMRFLxmc7MEWIsdfpcWuTYymOw3fSSohcL/dnz8I1CiWXht/Eqxvb8r3zQ9w+mPNrwWhdcFdawUnsHZvtJzaMs6WJGOB1G8+PCc0bRrLVCqLJG29P6Wc4Rtpqvv5N/bUQhB0p+g2q9EhKYu5RgBYTit/rBXFEEx4aL1iiBFvPl3wkZwRusHUgjTA4PmtxaKHhrWkvpUSao/PFQUIzOwBic4FtkSlZEBuSGkvkXJj1orSiUhkwMvuQMQ==
  • Cc: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 14 Mar 2023 20:57:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHZVrdzYEuAtB/tbEeKWg2MuafMXg==
  • Thread-topic: [PATCH v3 6/6] xen: pci: print reference counter when dumping pci_devs

This can be handy during new reference counter approach evaluation.

Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>

---

v3:
 - Moved from another patch series
---
 xen/drivers/passthrough/pci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
index b32382aca0..1eb79e7d01 100644
--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -1275,7 +1275,8 @@ static int cf_check _dump_pci_devices(struct pci_seg 
*pseg, void *arg)
         else
 #endif
             printk("%pd", pdev->domain);
-        printk(" - node %-3d", (pdev->node != NUMA_NO_NODE) ? pdev->node : -1);
+        printk(" - node %-3d refcnt %d", (pdev->node != NUMA_NO_NODE) ? 
pdev->node : -1,
+               refcnt_read(&pdev->refcnt));
         pdev_dump_msi(pdev);
         printk("\n");
     }
-- 
2.39.2



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.