From: "Jan Beulich" <jbeulich@novell.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>,
Jan Beulich <JBeulich@novell.com>
Cc: xen-devel@lists.xensource.com, Ben Thomas <bthomas@virtualiron.com>
Subject: Re: page_alloc query
Date: Wed, 07 Mar 2007 09:18:02 +0000 [thread overview]
Message-ID: <45EE915A.76E4.0078.0@novell.com> (raw)
In-Reply-To: <45EE8F64.76E4.0078.0@novell.com>
>>> "Jan Beulich" <jbeulich@novell.com> 07.03.07 10:09 >>>
>>>> Keir Fraser <Keir.Fraser@cl.cam.ac.uk> 07.03.07 09:27 >>>
>>On 6/3/07 22:10, "Ben Thomas" <bthomas@virtualiron.com> wrote:
>>
>>> Why are the zones unsigned ints when they are used as indices ?
>>> The ASSERTS do checks to keep you out of some amount of
>>> trouble, but the loop appears to be able to get you quickly
>>> into trouble by driving the index negative and with a check
>>> that doesn't appear to be effective.
>>
>>This is already fixed in the staging tree.
>
>Hmm, looking at that fix I doubt it helps - since zone_lo and zone_hi remain
>unsigned, my understanding would be that the signed zone is converted to
>unsigned before the comparison, hence nothing changes.
>
>And I really think using signed variables for array indices is odd - it performs
>worse on x86-64/ia64 at least (because of the extra sign extension, whereas
>the zero extension is implied in most/some operations), and it certainly is
>contrary to how arrays work (they don't normally have fields accessible with
>negative indices).
e.g. by instead doing
for ( zone = zone_hi + 1; zone-- > zone_lo; )
Jan
next prev parent reply other threads:[~2007-03-07 9:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-06 22:10 page_alloc query Ben Thomas
2007-03-07 8:27 ` Keir Fraser
2007-03-07 9:09 ` Jan Beulich
2007-03-07 9:18 ` Jan Beulich [this message]
2007-03-07 9:40 ` Keir Fraser
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=45EE915A.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=bthomas@virtualiron.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.