Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105313
b: refs/heads/master
c: e11bfbf
h: refs/heads/master
i:
  105311: 97e2260
v: v3
  • Loading branch information
Nick Piggin authored and Linus Torvalds committed Jul 24, 2008
1 parent 1fafd27 commit a25c8a9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b4718e628dbf68a2dee23b5709e2aa3190409c56
refs/heads/master: e11bfbfcb08ef4223b863799897c19cdf7c5bc00
7 changes: 7 additions & 0 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,13 @@ and is between 256 and 4096 characters. It is defined in the file
CPU supports the "pdpe1gb" cpuinfo flag)
Note that 1GB pages can only be allocated at boot time
using hugepages= and not freed afterwards.
default_hugepagesz=
[same as hugepagesz=] The size of the default
HugeTLB page size. This is the size represented by
the legacy /proc/ hugepages APIs, used for SHM, and
default size when mounting hugetlbfs filesystems.
Defaults to the default architecture's huge page size
if not specified.

i8042.direct [HW] Put keyboard port into non-translated mode
i8042.dumbkbd [HW] Pretend that controller can only read data from
Expand Down
23 changes: 17 additions & 6 deletions trunk/mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +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;

#define for_each_hstate(h) \
for ((h) = hstates; (h) < &hstates[max_hstate]; (h)++)
Expand Down Expand Up @@ -1288,11 +1289,14 @@ static int __init hugetlb_init(void)
{
BUILD_BUG_ON(HPAGE_SHIFT == 0);

if (!size_to_hstate(HPAGE_SIZE)) {
hugetlb_add_hstate(HUGETLB_PAGE_ORDER);
parsed_hstate->max_huge_pages = default_hstate_max_huge_pages;
if (!size_to_hstate(default_hstate_size)) {
default_hstate_size = HPAGE_SIZE;
if (!size_to_hstate(default_hstate_size))
hugetlb_add_hstate(HUGETLB_PAGE_ORDER);
}
default_hstate_idx = size_to_hstate(HPAGE_SIZE) - hstates;
default_hstate_idx = size_to_hstate(default_hstate_size) - hstates;
if (default_hstate_max_huge_pages)
default_hstate.max_huge_pages = default_hstate_max_huge_pages;

hugetlb_init_hstates();

Expand Down Expand Up @@ -1332,7 +1336,7 @@ void __init hugetlb_add_hstate(unsigned order)
parsed_hstate = h;
}

static int __init hugetlb_setup(char *s)
static int __init hugetlb_nrpages_setup(char *s)
{
unsigned long *mhp;
static unsigned long *last_mhp;
Expand Down Expand Up @@ -1367,7 +1371,14 @@ static int __init hugetlb_setup(char *s)

return 1;
}
__setup("hugepages=", hugetlb_setup);
__setup("hugepages=", hugetlb_nrpages_setup);

static int __init hugetlb_default_setup(char *s)
{
default_hstate_size = memparse(s, &s);
return 1;
}
__setup("default_hugepagesz=", hugetlb_default_setup);

static unsigned int cpuset_mems_nr(unsigned int *array)
{
Expand Down

0 comments on commit a25c8a9

Please sign in to comment.