From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org
Cc: "Juergen Gross" <jgross@suse.com>,
"Roger Pau Monné" <roger@xenproject.org>,
"Jens Axboe" <axboe@kernel.dk>,
xen-devel@lists.xenproject.org
Subject: [PATCH 1/3] xen-blkback: Remove statistics logging on console
Date: Wed, 11 Nov 2026 17:20:56 +0100 [thread overview]
Message-ID: <20261111162058.804033-2-jgross@suse.com> (raw)
In-Reply-To: <20261111162058.804033-1-jgross@suse.com>
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@suse.com>
---
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
next prev parent reply other threads:[~2026-11-11 16:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 16:20 [PATCH 0/3] xen-blkback: do some I/O statistics rework Juergen Gross
2026-11-11 16:20 ` Juergen Gross [this message]
2026-11-11 16:20 ` [PATCH 2/3] xen-blkback: move statistics data into sub-structure Juergen Gross
2026-11-11 16:20 ` [PATCH 3/3] xen-blkback: make statistics data persistent across disconnect/connect Juergen Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261111162058.804033-2-jgross@suse.com \
--to=jgross@suse.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=roger@xenproject.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®