diff options
author | Andy Whitcroft <apw@shadowen.org> | 2008-10-02 14:50:18 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-02 15:53:13 -0700 |
commit | 6babc32c41e3642d875372cb6afbd9ade7a9f311 (patch) | |
tree | e37e7c5a1d73c5c1f64ec06229cd94b85ccf3b16 /mm/slub.c | |
parent | 4b19de6d1cb07c8bcb6778e771f9cfd5bcfdfd3e (diff) | |
download | linux-6babc32c41e3642d875372cb6afbd9ade7a9f311.tar.gz linux-6babc32c41e3642d875372cb6afbd9ade7a9f311.tar.bz2 linux-6babc32c41e3642d875372cb6afbd9ade7a9f311.zip |
mm: handle initialising compound pages at orders greater than MAX_ORDER
When we initialise a compound page we initialise the page flags and head
page pointer for all base pages spanned by that page. When we initialise
a gigantic page (a page of order greater than or equal to MAX_ORDER) we
have to initialise more than MAX_ORDER_NR_PAGES pages. Currently we
assume that all elements of the mem_map in this page are contigious in
memory. However this is only guarenteed out to MAX_ORDER_NR_PAGES pages,
and with SPARSEMEM enabled they will not be contigious. This leads us to
walk off the end of the first section and scribble on everything which
follows, BAD.
When we reach a MAX_ORDER_NR_PAGES boundary we much locate the next
section of the mem_map. As gigantic pages can only be maximally aligned
we know this will occur at exact multiple of MAX_ORDER_NR_PAGES pages from
the start of the page.
This is a bug fix for the gigantic page support in hugetlbfs.
Credit to Mel Gorman for spotting the issue.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Jon Tollefson <kniht@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/slub.c')
0 files changed, 0 insertions, 0 deletions