All of lore.kernel.org
 help / color / mirror / Atom feed
From: Furkan Caliskan <frn1furkan10@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: jgross@suse.com, jbeulich@suse.com, andrew.cooper3@citrix.com,
	roger@xenproject.org, dfaggioli@suse.com,
	anthony.perard@vates.tech, julien@xen.org,
	sstabellini@kernel.org, gwd@xenproject.org, enr0n@ubuntu.com,
	michal.orzel@amd.com, Furkan Caliskan <frn1furkan10@gmail.com>
Subject: [PATCH 3/5] xen/sched: rtds: report utilization and cap via debug key
Date: Wed, 26 Aug 2026 07:57:18 +0300	[thread overview]
Message-ID: <20260826045720.5779-4-frn1furkan10@gmail.com> (raw)
In-Reply-To: <20260826045720.5779-1-frn1furkan10@gmail.com>

Print a cpupool's admitted utilization against its capacity in the
'r' debug ky (xl debug-keys r), so an operator can see the total
usage of a cpupool.

Signed-off-by: Furkan Caliskan <frn1furkan10@gmail.com>
---
 xen/common/sched/rt.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/xen/common/sched/rt.c b/xen/common/sched/rt.c
index 9643a277fe..0582c0094d 100644
--- a/xen/common/sched/rt.c
+++ b/xen/common/sched/rt.c
@@ -399,12 +399,22 @@ rt_dump(const struct scheduler *ops)
     const struct rt_unit *svc;
     const struct rt_dom *sdom;
     unsigned long flags;
+    uint64_t cap;
 
     spin_lock_irqsave(&prv->lock, flags);
 
     if ( list_empty(&prv->sdom) )
         goto out;
 
+    cap = (uint64_t)cpumask_weight(ops->cpupool->res_valid) *
+          RTDS_UTIL_SCALE * RTDS_UTIL_CAP_PCT / 100;
+
+    if ( cap )
+        printk("Utilization: %llu%% of capacity\n",
+               (unsigned long long)(prv->utilization * 100 / cap));
+    else
+        printk("Utilization: cpupool has no capacity\n");
+
     runq = rt_runq(ops);
     depletedq = rt_depletedq(ops);
     replq = rt_replq(ops);
-- 
2.34.1



  parent reply	other threads:[~2026-08-26  4:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-26  4:57 [PATCH 0/5] xen/sched: rtds: add per-cpupool admission control Furkan Caliskan
2026-08-26  4:57 ` [PATCH 1/5] xen/sched: rtds: add global-EDF utilization " Furkan Caliskan
2026-08-26  4:57 ` [PATCH 2/5] xen/sched: rtds: enforce admission control in xl sched-rtds Furkan Caliskan
2026-08-26  4:57 ` Furkan Caliskan [this message]
2026-08-26  4:57 ` [PATCH 4/5] xen/sched: rtds: make admission control cpupool-wide toggleable Furkan Caliskan
2026-08-26  6:14   ` Jan Beulich
2026-08-26  4:57 ` [PATCH 5/5] tools: expose admission control toggle via xl sched-rtds Furkan Caliskan

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=20260826045720.5779-4-frn1furkan10@gmail.com \
    --to=frn1furkan10@gmail.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=dfaggioli@suse.com \
    --cc=enr0n@ubuntu.com \
    --cc=gwd@xenproject.org \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger@xenproject.org \
    --cc=sstabellini@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.