[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20111117155703.b8af6be5.akpm@linux-foundation.org>
Date: Thu, 17 Nov 2011 15:57:03 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: David Daney <ddaney.cavm@...il.com>
Cc: David Rientjes <rientjes@...gle.com>,
"linux-mips@...ux-mips.org" <linux-mips@...ux-mips.org>,
"ralf@...ux-mips.org" <ralf@...ux-mips.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
David Daney <david.daney@...ium.com>,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
Robin Holt <holt@....com>
Subject: Re: [patch] hugetlb: remove dummy definitions of HPAGE_MASK and
HPAGE_SIZE
On Thu, 17 Nov 2011 15:52:28 -0800
David Daney <ddaney.cavm@...il.com> wrote:
> A counter argument would be:
>
> There are hundreds of places in the kernel where dummy definitions are
> selected by !CONFIG_* so that we can do:
>
> if (test_something()) {
> do_one_thing();
> } else {
> do_the_other_thing();
> }
>
>
> Rather than:
>
> #ifdef CONFIG_SOMETHING
> if (test_something()) {
> do_one_thing();
> } else
> #else
> {
> do_the_other_thing();
> }
>
>
>
> We even do this all over the place with dummy definitions selected by
> CONFIG_HUGETLB_PAGE, What exactly makes HPAGE_MASK special and not the
> hundreds of other similar situations?
yup. Look at free_pgtables():
if (is_vm_hugetlb_page(vma)) {
hugetlb_free_pgd_range(tlb, addr, vma->vm_end,
floor, next? next->vm_start: ceiling);
} else {
and
#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; })
This is the same thing.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists