From: David Gibson <david@gibson.dropbear.id.au>
To: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Cc: Hugh Dickins <hugh@veritas.com>,
"Luck, Tony" <tony.luck@intel.com>,
linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [patch] fix ia64 hugetlb_free_pgd_range
Date: Mon, 27 Feb 2006 00:27:42 +0000 [thread overview]
Message-ID: <20060227002742.GC24422@localhost.localdomain> (raw)
In-Reply-To: <B05667366EE6204181EABE9C1B1C0EB509C43438@scsmsx401.amr.corp.intel.com>
On Thu, Feb 23, 2006 at 10:30:39PM -0800, Chen, Kenneth W wrote:
> David Gibson wrote on Thursday, February 23, 2006 8:06 PM
> > But I don't see how not transforming them sometimes can be correct.
> > Suppose 'floor' is only a little way below 'addr' - addr will be
> > shifted down, but floor won't, so floor may now be above addr, which
> > will cause weird results.
> >
> > Afaict the *only* thing floor and ceiling are used for is bounds
> > checking the address range we're examining. How can that ever be
> > right if one address has been scaled down, but the other hasn't.
>
> The scale down isn't exactly on every address bits. Top 3 bits of
> virtual address are preserved.
Ah.. yes.
> #define htlbpage_to_page(x) (((unsigned long) REGION_NUMBER(x) << 61)
> | (REGION_OFFSET(x) >>
> (HPAGE_SHIFT-PAGE_SHIFT)))
>
> So scaled address for a hugetlb address will never be below unscaled
> normal page address. That is adjusted addr will never below unchanged
> floor.
Ok. So in fact it wouldn't matter whether or not addresses outside
the region are scaled, but conceptually they probably should be.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
WARNING: multiple messages have this Message-ID (diff)
From: David Gibson <david@gibson.dropbear.id.au>
To: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Cc: Hugh Dickins <hugh@veritas.com>,
"Luck, Tony" <tony.luck@intel.com>,
linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [patch] fix ia64 hugetlb_free_pgd_range
Date: Mon, 27 Feb 2006 11:27:42 +1100 [thread overview]
Message-ID: <20060227002742.GC24422@localhost.localdomain> (raw)
In-Reply-To: <B05667366EE6204181EABE9C1B1C0EB509C43438@scsmsx401.amr.corp.intel.com>
On Thu, Feb 23, 2006 at 10:30:39PM -0800, Chen, Kenneth W wrote:
> David Gibson wrote on Thursday, February 23, 2006 8:06 PM
> > But I don't see how not transforming them sometimes can be correct.
> > Suppose 'floor' is only a little way below 'addr' - addr will be
> > shifted down, but floor won't, so floor may now be above addr, which
> > will cause weird results.
> >
> > Afaict the *only* thing floor and ceiling are used for is bounds
> > checking the address range we're examining. How can that ever be
> > right if one address has been scaled down, but the other hasn't.
>
> The scale down isn't exactly on every address bits. Top 3 bits of
> virtual address are preserved.
Ah.. yes.
> #define htlbpage_to_page(x) (((unsigned long) REGION_NUMBER(x) << 61)
> | (REGION_OFFSET(x) >>
> (HPAGE_SHIFT-PAGE_SHIFT)))
>
> So scaled address for a hugetlb address will never be below unscaled
> normal page address. That is adjusted addr will never below unchanged
> floor.
Ok. So in fact it wouldn't matter whether or not addresses outside
the region are scaled, but conceptually they probably should be.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
next prev parent reply other threads:[~2006-02-27 0:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-24 1:45 [patch] fix ia64 hugetlb_free_pgd_range Chen, Kenneth W
2006-02-24 1:45 ` Chen, Kenneth W
2006-02-24 2:44 ` 'David Gibson'
2006-02-24 2:44 ` 'David Gibson'
2006-02-24 3:05 ` Chen, Kenneth W
2006-02-24 3:05 ` Chen, Kenneth W
2006-02-24 4:05 ` 'David Gibson'
2006-02-24 4:05 ` 'David Gibson'
2006-02-24 6:30 ` Chen, Kenneth W
2006-02-24 6:30 ` Chen, Kenneth W
2006-02-27 0:27 ` David Gibson [this message]
2006-02-27 0:27 ` David Gibson
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=20060227002742.GC24422@localhost.localdomain \
--to=david@gibson.dropbear.id.au \
--cc=hugh@veritas.com \
--cc=kenneth.w.chen@intel.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.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.