Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\hugetlb.c Create Date:2022-07-28 15:27:44
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:hugetlb_init

Proto:static int __init hugetlb_init(void)

Type:int

Parameter:Nothing

2829  If Not hugepages_supported() Then Return 0
2832  If Not size_to_hstate(default_hstate_size) Then
2833  If default_hstate_size != 0 Then
2834  pr_err("HugeTLB: unsupported default_hugepagesz %lu. Reverting to %lu\n", default_hstate_size, HPAGE_SIZE)
2838  default_hstate_size = HPAGE_SIZE
2839  If Not size_to_hstate(default_hstate_size) Then hugetlb_add_hstate(HUGETLB_PAGE_ORDER)
2842  default_hstate_idx = hstate_index(size_to_hstate(default_hstate_size))
2843  If default_hstate_max_huge_pages Then
2844  If Not max_huge_pages Then max_huge_pages = default_hstate_max_huge_pages
2848  hugetlb_init_hstates()
2849  Put bootmem huge pages into the standard lists after mem_map is up
2850  report_hugepages()
2852  hugetlb_sysfs_init()
2853  hugetlb init time: register hstate attributes for all registered node* devices of nodes that have memory. All on-line nodes should have* registered their associated device by this time.
2854  hugetlb_cgroup_file_init()
2859  Serializes faults on the same logical page. This is used to* prevent spurious OOMs when the hugepage pool is fully utilized. = 1
2861  hugetlb_fault_mutex_table = kmalloc_array - allocate memory for an array.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
2864  BUG_ON(!hugetlb_fault_mutex_table)
2866  When i < Serializes faults on the same logical page. This is used to* prevent spurious OOMs when the hugepage pool is fully utilized. cycle mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & hugetlb_fault_mutex_table[i])
2868  Return 0