aboutsummaryrefslogtreecommitdiff
path: root/include/linux/timerqueue.h
diff options
context:
space:
mode:
authorVaishali Thakkar <[email protected]>2016-05-19 17:11:04 -0700
committerLinus Torvalds <[email protected]>2016-05-19 19:12:14 -0700
commit9fee021d15ddd884d40d1540913474e8112313fe (patch)
tree32bbcb5b7739290fe8f60e07bc48297d3d208f7b /include/linux/timerqueue.h
parent09a95e29cb30a3930db22d340ddd072a82b6b0db (diff)
mm/hugetlb: introduce hugetlb_bad_size()
When any unsupported hugepage size is specified, 'hugepagesz=' and 'hugepages=' should be ignored during command line parsing until any supported hugepage size is found. But currently incorrect number of hugepages are allocated when unsupported size is specified as it fails to ignore the 'hugepages=' command. Test case: Note that this is specific to x86 architecture. Boot the kernel with command line option 'hugepagesz=256M hugepages=X'. After boot, dmesg output shows that X number of hugepages of the size 2M is pre-allocated instead of 0. So, to handle such command line options, introduce new routine hugetlb_bad_size. The routine hugetlb_bad_size sets the global variable parsed_valid_hugepagesz. We are using parsed_valid_hugepagesz to save the state when unsupported hugepagesize is found so that we can ignore the 'hugepages=' parameters after that and then reset the variable when supported hugepage size is found. The routine hugetlb_bad_size can be called while setting 'hugepagesz=' parameter in an architecture specific code. Signed-off-by: Vaishali Thakkar <[email protected]> Reviewed-by: Mike Kravetz <[email protected]> Reviewed-by: Naoya Horiguchi <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: Hillf Danton <[email protected]> Cc: Yaowei Bai <[email protected]> Cc: Dominik Dingel <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: James Hogan <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions