From: Andi Kleen <ak@suse.de>
To: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Cc: Dave McCracken <dmccr@us.ibm.com>,
'Hugh Dickins' <hugh@veritas.com>,
'Andrew Morton' <akpm@osdl.org>,
linux-mm@kvack.org
Subject: Re: [patch] shared page table for hugetlb page
Date: Thu, 8 Jun 2006 03:25:19 +0200 [thread overview]
Message-ID: <200606080325.19994.ak@suse.de> (raw)
In-Reply-To: <000101c68a74$16aeed40$d534030a@amr.corp.intel.com>
> diff -Nurp linux-2.6.16/arch/i386/mm/hugetlbpage.c linux-2.6.16.ken/arch/i386/mm/hugetlbpage.c
> --- linux-2.6.16/arch/i386/mm/hugetlbpage.c 2006-06-07 08:07:52.000000000 -0700
> +++ linux-2.6.16.ken/arch/i386/mm/hugetlbpage.c 2006-06-07 10:44:31.000000000 -0700
> @@ -18,16 +18,102 @@
> #include <asm/tlb.h>
> #include <asm/tlbflush.h>
>
> +#ifdef CONFIG_X86_64
Why is this done for x86-64 only?
> +int huge_pte_put(struct vm_area_struct *vma, unsigned long *addr, pte_t *ptep)
> +{
> + pgd_t *pgd = pgd_offset(vma->vm_mm, *addr);
> + pud_t *pud = pud_offset(pgd, *addr);
> +
> + if (page_count(virt_to_page(ptep)) <= 1)
> + return 0;
> +
> + pud_clear(pud);
> + put_page(virt_to_page(ptep));
You could cache page in a local variable.
> + *addr = ALIGN(*addr, HPAGE_SIZE * PTRS_PER_PTE) - HPAGE_SIZE;
> + return 1;
> +}
> +#else
> +void pmd_share(struct vm_area_struct *vma, pud_t *pud, unsigned long addr)
> +{
> +}
> +#endif
> +
> pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr)
> {
> + /*
> + * to be fixed: pass me the darn vma pointer.
> + */
Just fix it?
Overall it looks nice&clean though.
-Andi
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2006-06-08 1:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-07 20:51 Chen, Kenneth W
2006-06-08 1:25 ` Andi Kleen [this message]
2006-06-08 1:39 ` Chen, Kenneth W
2006-06-08 7:31 ` Andi Kleen
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=200606080325.19994.ak@suse.de \
--to=ak@suse.de \
--cc=akpm@osdl.org \
--cc=dmccr@us.ibm.com \
--cc=hugh@veritas.com \
--cc=kenneth.w.chen@intel.com \
--cc=linux-mm@kvack.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