From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Keir Fraser <keir@xen.org>, Jan Beulich <JBeulich@suse.com>
Subject: [PATCH URGENT] common/vsprintf: Fix signed->unsigned error, causing glacial performance.
Date: Tue, 12 Nov 2013 16:10:21 +0000 [thread overview]
Message-ID: <1384272621-21655-1-git-send-email-andrew.cooper3@citrix.com> (raw)
The original patch for
c/s 67a3542c5bc356e6452d8305991617c875f87de4
"common/vsprintf: Refactor string() out of vsnprintf()"
specifically used signed integers, identical to the code copied out of vsprintf.
When committed, these had changed to unsigned integers, which causes a
functional change. This causes glacial boot performance and an excessive
quantity of spaces printed to the serial console, as we loop to the upper
bound of a 32bit integer.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <JBeulich@suse.com>
---
xen/common/vsprintf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/common/vsprintf.c b/xen/common/vsprintf.c
index e8f45eb..43dc392 100644
--- a/xen/common/vsprintf.c
+++ b/xen/common/vsprintf.c
@@ -239,7 +239,7 @@ static char *number(
static char *string(char *str, char *end, const char *s,
int field_width, int precision, int flags)
{
- unsigned int i, len = strnlen(s, precision);
+ int i, len = strnlen(s, precision);
if (!(flags & LEFT)) {
while (len < field_width--) {
--
1.7.10.4
next reply other threads:[~2013-11-12 16:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-12 16:10 Andrew Cooper [this message]
2013-11-12 16:23 ` [PATCH URGENT] common/vsprintf: Fix signed->unsigned error, causing glacial performance Jan Beulich
2013-11-12 17:04 ` Andrew Cooper
2013-11-13 7:33 ` Jan Beulich
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=1384272621-21655-1-git-send-email-andrew.cooper3@citrix.com \
--to=andrew.cooper3@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).