From: Christoph Lameter <clameter@sgi.com>
To: Adam Litke <agl@us.ibm.com>
Cc: linuxppc-dev@ozlabs.org,
David Gibson <david@gibson.dropbear.id.au>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] hugetlb: powerpc: Actively close unused htlb regions on vma close
Date: Fri, 2 Jun 2006 13:06:43 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0606021301300.5492@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <1149257287.9693.6.camel@localhost.localdomain>
On Fri, 2 Jun 2006, Adam Litke wrote:
> The following patch introduces a architecture-specific vm_ops.close()
> hook. For all architectures besides powerpc, this is a no-op. On
> powerpc, the low and high segments are scanned to locate empty hugetlb
> segments which can be made available for normal mappings. Comments?
IA64 has similar issues and uses the hook suggested by Hugh. However, we
have a permanently reserved memory area. I am a bit surprised about the
need to make address space available for normal mappings. Is this for 32
bit powerpc support?
void hugetlb_free_pgd_range(struct mmu_gather **tlb,
unsigned long addr, unsigned long end,
unsigned long floor, unsigned long ceiling)
{
/*
* This is called to free hugetlb page tables.
*
* The offset of these addresses from the base of the hugetlb
* region must be scaled down by HPAGE_SIZE/PAGE_SIZE so that
* the standard free_pgd_range will free the right page tables.
*
* If floor and ceiling are also in the hugetlb region, they
* must likewise be scaled down; but if outside, left unchanged.
*/
addr = htlbpage_to_page(addr);
end = htlbpage_to_page(end);
if (REGION_NUMBER(floor) == RGN_HPAGE)
floor = htlbpage_to_page(floor);
if (REGION_NUMBER(ceiling) == RGN_HPAGE)
ceiling = htlbpage_to_page(ceiling);
free_pgd_range(tlb, addr, end, floor, ceiling);
}
next prev parent reply other threads:[~2006-06-02 20:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-02 14:08 [PATCH] hugetlb: powerpc: Actively close unused htlb regions on vma close Adam Litke
2006-06-02 15:17 ` Dave Hansen
2006-06-02 16:47 ` Adam Litke
2006-06-02 16:43 ` Hugh Dickins
2006-06-02 16:49 ` Adam Litke
2006-06-02 20:06 ` Christoph Lameter [this message]
2006-06-02 20:57 ` Adam Litke
2006-06-02 21:08 ` Christoph Lameter
2006-06-09 8:49 ` 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=Pine.LNX.4.64.0606021301300.5492@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=agl@us.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@ozlabs.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).