From: Zoltan Kiss <zoltan.kiss@citrix.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: [blkback] blkback statistic counters are signed values
Date: Mon, 4 Mar 2013 15:54:42 +0000 [thread overview]
Message-ID: <5134C3C2.6040108@citrix.com> (raw)
Hi,
One of our colleagues spotted a problem in xentop. Sometimes the
VBD_WSECT value suddenly becomes unreasonably high, and it turned out
xentop reads
/sys/bus/xen-backend/devices/vbd-(domid)-(devID)/statistics/wr_sect into
an unsigned long long. That value is exposed by blkback, and among other
stat counters, it's a signed integer:
drivers/block/xen-blkback/common.h
struct xen_blkif {
...
int st_rd_req;
int st_wr_req;
int st_oo_req;
int st_f_req;
int st_ds_req;
int st_rd_sect;
int st_wr_sect;
I don't think these values should be negative ever, but when they
overflow (which happens eventually), they do, and this leads to bad
conversion in xentop.
I think the best solution would be to change the above mentioned values
to unsigned long long as well. Any comments on that?
Regards,
Zoltan Kiss
next reply other threads:[~2013-03-04 15:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 15:54 Zoltan Kiss [this message]
2013-03-04 19:22 ` [blkback] blkback statistic counters are signed values Konrad Rzeszutek Wilk
2013-03-05 18:07 ` Zoltan Kiss
2013-03-06 11:14 ` David Vrabel
2013-03-06 15:41 ` Konrad Rzeszutek Wilk
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=5134C3C2.6040108@citrix.com \
--to=zoltan.kiss@citrix.com \
--cc=xen-devel@lists.xensource.com \
/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.