From: Jon Tollefson <kniht@us.ibm.com>
To: Nick Piggin <npiggin@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Adam Litke <agl@us.ibm.com>,
Nishanth Aravamudan <nacc@us.ibm.com>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [patch] hugetlb: override default huge page size non-const fix
Date: Thu, 24 Jul 2008 02:29:14 -0500 [thread overview]
Message-ID: <48882F4A.10201@us.ibm.com> (raw)
In-Reply-To: <20080723040644.GA18119@wotan.suse.de>
Nick Piggin wrote:
> Hi,
>
> I revisited the multi-size hugetlb patches, and realised I forgot one small
> outstanding issue. Your
> hugetlb-override-default-huge-page-size-ia64-build.patch
> fix basically disallows overriding of the default hugetlb size, because we
> always set the default back to HPAGE_SIZE.
>
> A better fix I think is just to initialize the default_hstate_size to an
> invalid value, which the init code checks for and reverts to HPAGE_SIZE
> anyway. So please replace that patch with this one.
>
> Overriding of the default hugepage size is not of major importance, but it
> can allow legacy code (providing it is well written), including the hugetlb
> regression suite to be run with different hugepage sizes (so actually it is
> quite important for developers at least).
>
> I don't have access to such a machine, but I hope (with this patch), the
> powerpc developers can run the libhugetlb regression suite one last time
> against a range of page sizes and ensure the results look reasonable.
>
I am a little slow here, but I was able to boot with
default_hugepagesz=64K and 16G on Power and it set the default huge page
size to the given size.
Jon
> Thanks,
> Nick
>
> --
>
> If HPAGE_SIZE is not constant (eg. on ia64), then the initialiser does not
> work. Fix this by making default_hstate_size == 0, then if it isn't set
> from the cmdline, hugetlb_init will still do the right thing and set up the
> default hstate as (the now initialized) HPAGE_SIZE.
>
> Signed-off-by: Nick Piggin <npiggin@suse.de>
> ---
> Index: linux-2.6/mm/hugetlb.c
> ===================================================================
> --- linux-2.6.orig/mm/hugetlb.c
> +++ linux-2.6/mm/hugetlb.c
> @@ -34,7 +34,7 @@ struct hstate hstates[HUGE_MAX_HSTATE];
> /* for command line parsing */
> static struct hstate * __initdata parsed_hstate;
> static unsigned long __initdata default_hstate_max_huge_pages;
> -static unsigned long __initdata default_hstate_size = HPAGE_SIZE;
> +static unsigned long __initdata default_hstate_size = 0;
>
> #define for_each_hstate(h) \
> for ((h) = hstates; (h) < &hstates[max_hstate]; (h)++)
>
--
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>
prev parent reply other threads:[~2008-07-24 7:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-23 4:06 Nick Piggin
2008-07-24 7:29 ` Jon Tollefson [this message]
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=48882F4A.10201@us.ibm.com \
--to=kniht@us.ibm.com \
--cc=agl@us.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=kniht@linux.vnet.ibm.com \
--cc=linux-mm@kvack.org \
--cc=nacc@us.ibm.com \
--cc=npiggin@suse.de \
/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