aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@engr.sgi.com>2006-02-05 02:27:55 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-05 14:06:53 -0500
commit64b4a954b03a1153fb8ae38d6ffbd991e01a1e80 (patch)
tree0436a6f23e46d9fcb6caf5b1216fe212be3fbc3f /mm
parentfe1dcbc4f311c2e6c23b33c0fa8572461618ab3e (diff)
[PATCH] hugetlb: add comment explaining reasons for Bus Errors
I just spent some time researching a Bus Error. Turns out that the huge page fault handler can return VM_FAULT_SIGBUS for various conditions where no huge page is available. Add a note explaining the reasoning in the source. Signed-off-by: Christoph Lameter <clameter@sgi.com> Acked-by: William Lee Irwin III <wli@holomorphy.com> Cc: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/hugetlb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index b21d78c941b5..ceb3ebb3c399 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -444,6 +444,15 @@ retry:
444 page = alloc_huge_page(vma, address); 444 page = alloc_huge_page(vma, address);
445 if (!page) { 445 if (!page) {
446 hugetlb_put_quota(mapping); 446 hugetlb_put_quota(mapping);
447 /*
448 * No huge pages available. So this is an OOM
449 * condition but we do not want to trigger the OOM
450 * killer, so we return VM_FAULT_SIGBUS.
451 *
452 * A program using hugepages may fault with Bus Error
453 * because no huge pages are available in the cpuset, per
454 * memory policy or because all are in use!
455 */
447 goto out; 456 goto out;
448 } 457 }
449 458