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

[PATCH 1/3] xen-blkback: Remove statistics logging on console


  • To: linux-kernel@xxxxxxxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx
  • From: Juergen Gross <jgross@xxxxxxxx>
  • Date: Wed, 11 Nov 2026 17:20:56 +0100
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=susede1 header.d=suse.com header.i="@suse.com" header.h="From:Date:Message-ID:To:Cc:MIME-Version:Content-Transfer-Encoding:In-Reply-To:References"; dkim=pass header.s=susede1 header.d=suse.com header.i="@suse.com" header.h="From:Date:Message-ID:To:Cc:MIME-Version:Content-Transfer-Encoding:In-Reply-To:References"
  • Authentication-results: smtp-out1.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b=M7quML3H
  • Cc: Juergen Gross <jgross@xxxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, Jens Axboe <axboe@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 11 Nov 2026 16:21:17 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The xen-blkback can print I/O statistics data to the console every
10 seconds. This functionality has been present since the introduction
of xen-blkback, but retrieving the data is possible via sysfs, too.

So remove the console logging, as there is no need to have the same
functionality twice.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
 drivers/block/xen-blkback/blkback.c | 25 -------------------------
 drivers/block/xen-blkback/common.h  |  1 -
 drivers/block/xen-blkback/xenbus.c  |  1 -
 3 files changed, 27 deletions(-)

diff --git a/drivers/block/xen-blkback/blkback.c 
b/drivers/block/xen-blkback/blkback.c
index 88526e349ce1..f3a8f3eae86b 100644
--- a/drivers/block/xen-blkback/blkback.c
+++ b/drivers/block/xen-blkback/blkback.c
@@ -126,10 +126,6 @@ MODULE_PARM_DESC(max_ring_page_order, "Maximum order of 
pages to be used for the
  */
 #define LRU_PERCENT_CLEAN 5
 
-/* Run-time switchable: /sys/module/blkback/parameters/ */
-static unsigned int log_stats;
-module_param(log_stats, int, 0644);
-
 #define BLKBACK_INVALID_HANDLE (~0)
 
 static inline bool persistent_gnt_timeout(struct persistent_gnt 
*persistent_gnt)
@@ -536,21 +532,6 @@ irqreturn_t xen_blkif_be_int(int irq, void *dev_id)
  * SCHEDULER FUNCTIONS
  */
 
-static void print_stats(struct xen_blkif_ring *ring)
-{
-       pr_info("(%s): oo %3llu  |  rd %4llu  |  wr %4llu  |  f %4llu"
-                "  |  ds %4llu | pg: %4u/%4d\n",
-                current->comm, ring->st_oo_req,
-                ring->st_rd_req, ring->st_wr_req,
-                ring->st_f_req, ring->st_ds_req,
-                ring->persistent_gnt_c, max_pgrants);
-       ring->st_print = jiffies + secs_to_jiffies(10);
-       ring->st_rd_req = 0;
-       ring->st_wr_req = 0;
-       ring->st_oo_req = 0;
-       ring->st_ds_req = 0;
-}
-
 int xen_blkif_schedule(void *arg)
 {
        struct xen_blkif_ring *ring = arg;
@@ -614,17 +595,11 @@ int xen_blkif_schedule(void *arg)
                else
                        gnttab_page_cache_shrink(&ring->free_pages,
                                                 max_buffer_pages);
-
-               if (log_stats && time_after(jiffies, ring->st_print))
-                       print_stats(ring);
        }
 
        /* Drain pending purge work */
        flush_work(&ring->persistent_purge_work);
 
-       if (log_stats)
-               print_stats(ring);
-
        ring->xenblkd = NULL;
 
        return 0;
diff --git a/drivers/block/xen-blkback/common.h 
b/drivers/block/xen-blkback/common.h
index f5890b3f1df9..0a60e29a7cc3 100644
--- a/drivers/block/xen-blkback/common.h
+++ b/drivers/block/xen-blkback/common.h
@@ -277,7 +277,6 @@ struct xen_blkif_ring {
        unsigned long           next_lru;
 
        /* Statistics. */
-       unsigned long           st_print;
        unsigned long long      st_rd_req;
        unsigned long long      st_wr_req;
        unsigned long long      st_oo_req;
diff --git a/drivers/block/xen-blkback/xenbus.c 
b/drivers/block/xen-blkback/xenbus.c
index 8d0ff8fcac22..62e3bad4ab0e 100644
--- a/drivers/block/xen-blkback/xenbus.c
+++ b/drivers/block/xen-blkback/xenbus.c
@@ -158,7 +158,6 @@ static int xen_blkif_alloc_rings(struct xen_blkif *blkif,
                init_waitqueue_head(&ring->pending_free_wq);
                init_waitqueue_head(&ring->shutdown_wq);
                ring->blkif = blkif;
-               ring->st_print = jiffies;
                ring->active = true;
        }
 
-- 
2.56.0




 


Rackspace

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