提交 64b4a954 编写于 作者: C Christoph Lameter 提交者: Linus Torvalds

[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: NChristoph Lameter <clameter@sgi.com>
Acked-by: NWilliam Lee Irwin III <wli@holomorphy.com>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 fe1dcbc4
......@@ -444,6 +444,15 @@ int hugetlb_no_page(struct mm_struct *mm, struct vm_area_struct *vma,
page = alloc_huge_page(vma, address);
if (!page) {
hugetlb_put_quota(mapping);
/*
* No huge pages available. So this is an OOM
* condition but we do not want to trigger the OOM
* killer, so we return VM_FAULT_SIGBUS.
*
* A program using hugepages may fault with Bus Error
* because no huge pages are available in the cpuset, per
* memory policy or because all are in use!
*/
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册