From: Dario Faggioli <dario.faggioli@citrix.com>
To: George Dunlap <george.dunlap@eu.citrix.com>
Cc: Paul Durrant <Paul.Durrant@citrix.com>,
"Keir (Xen.org)" <keir@xen.org>, Jan Beulich <jbeulich@suse.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH 5 of 6] xen: sched_sedf: beautify statisics in SEDF
Date: Tue, 23 Oct 2012 18:33:43 +0200 [thread overview]
Message-ID: <1351010023.5064.63.camel@Solace> (raw)
In-Reply-To: <5086C544.4070607@eu.citrix.com>
[-- Attachment #1.1: Type: text/plain, Size: 3422 bytes --]
On Tue, 2012-10-23 at 17:26 +0100, George Dunlap wrote:
> On 22/10/12 15:40, Dario Faggioli wrote:
> > By gathering all the related fields in a struct (as it is being done
> > in credit) and using the macros we now have available. No functional
> > changes involved.
> >
> > Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
>
> I'm OK with this as it is, but...
>
Ok.
> > #ifdef SEDF_STATS
> > - if ( EDOM_INFO(d)->block_time_tot != 0 )
> > - printk(" pen=%"PRIu64"%%", (EDOM_INFO(d)->penalty_time_tot * 100) /
> > - EDOM_INFO(d)->block_time_tot);
> > - if ( EDOM_INFO(d)->block_tot != 0 )
> > + if ( EDOM_INFO(d)->stats.block_time_tot != 0 )
> > + printk(" pen=%"PRIu64"%%", (EDOM_INFO(d)->stats.penalty_time_tot * 100) /
> > + EDOM_INFO(d)->stats.block_time_tot);
> > + if ( EDOM_INFO(d)->stats.block_tot != 0 )
> > printk("\n blks=%u sh=%u (%u%%) (shc=%u (%u%%) shex=%i "\
> > "shexsl=%i) l=%u (%u%%) avg: b=%"PRIu64" p=%"PRIu64"",
> > - EDOM_INFO(d)->block_tot, EDOM_INFO(d)->short_block_tot,
> > - (EDOM_INFO(d)->short_block_tot * 100)
> > - / EDOM_INFO(d)->block_tot, EDOM_INFO(d)->short_cont,
> > - (EDOM_INFO(d)->short_cont * 100) / EDOM_INFO(d)->block_tot,
> > - EDOM_INFO(d)->pen_extra_blocks,
> > - EDOM_INFO(d)->pen_extra_slices,
> > - EDOM_INFO(d)->long_block_tot,
> > - (EDOM_INFO(d)->long_block_tot * 100) / EDOM_INFO(d)->block_tot,
> > - (EDOM_INFO(d)->block_time_tot) / EDOM_INFO(d)->block_tot,
> > - (EDOM_INFO(d)->penalty_time_tot) / EDOM_INFO(d)->block_tot);
> > + EDOM_INFO(d)->stats.block_tot, EDOM_INFO(d)->stats.short_block_tot,
> > + (EDOM_INFO(d)->stats.short_block_tot * 100)
> > + / EDOM_INFO(d)->stats.block_tot, EDOM_INFO(d)->stats.short_cont,
> > + (EDOM_INFO(d)->stats.short_cont * 100) / EDOM_INFO(d)->stats.block_tot,
> > + EDOM_INFO(d)->stats.pen_extra_blocks,
> > + EDOM_INFO(d)->stats.pen_extra_slices,
> > + EDOM_INFO(d)->stats.long_block_tot,
> > + (EDOM_INFO(d)->stats.long_block_tot * 100) / EDOM_INFO(d)->stats.block_tot,
> > + (EDOM_INFO(d)->stats.block_time_tot) / EDOM_INFO(d)->stats.block_tot,
> > + (EDOM_INFO(d)->stats.penalty_time_tot) / EDOM_INFO(d)->stats.block_tot);
>
> ...wouldn't it be even more beautiful to have a macro for reading stats
> as well?
>
> Like I said, it's fine as it is, but since you're looking for beauty, I
> figured I'd point it out. :-)
>
I see what you mean. Again, as you wish.
This code will need some (and quite a bit actually) of attention as soon
as I or someone else get the time to work on it. If you're fine about
taking this as is, I'll make a note to self about the macro (as I agree
it would be nice).
OTOH, if you prefer me to repost the patch, I think I can find 5 mins to
hack it up...
Thanks and Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2012-10-23 16:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-22 14:40 [PATCH 0 of 6] Xen: generalize and beautify scheduling related perfc and stats Dario Faggioli
2012-10-22 14:40 ` [PATCH 1 of 6] xen: fix build when 'perfc=y' Dario Faggioli
2012-10-23 16:01 ` George Dunlap
2012-10-22 14:40 ` [PATCH 2 of 6] xen: move `printk("Initializing domain")` from credit to generic scheduling code Dario Faggioli
2012-10-23 16:04 ` George Dunlap
2012-10-23 16:13 ` Dario Faggioli
2012-10-23 16:20 ` George Dunlap
2012-10-22 14:40 ` [PATCH 3 of 6] xen: sched: generalize scheduling related perfcounter macros Dario Faggioli
2012-10-23 16:27 ` George Dunlap
2012-10-22 14:40 ` [PATCH 4 of 6] xen: sched: introduce a couple of counters in credit2 and SEDF Dario Faggioli
2012-10-23 16:28 ` George Dunlap
2012-10-22 14:40 ` [PATCH 5 of 6] xen: sched_sedf: beautify statisics in SEDF Dario Faggioli
2012-10-23 16:26 ` George Dunlap
2012-10-23 16:33 ` Dario Faggioli [this message]
2012-10-23 16:35 ` George Dunlap
2012-10-22 14:40 ` [PATCH 6 of 6] xen: sched_sedf: remove an unused stat " Dario Faggioli
2012-10-23 16:30 ` George Dunlap
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=1351010023.5064.63.camel@Solace \
--to=dario.faggioli@citrix.com \
--cc=Paul.Durrant@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xen.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;
as well as URLs for NNTP newsgroup(s).