Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:hugepage_init

Proto:static int __init hugepage_init(void)

Type:int

Parameter:Nothing

395  If Not has_transparent_hugepage() Then
396  By default, transparent hugepage support is disabled in order to avoid* risking an increased memory footprint for applications that are not* guaranteed to benefit from it. When transparent hugepage support is = 0
397  Return -EINVAL
403  MAYBE_BUILD_BUG_ON(HPAGE_PMD_ORDER >= Free memory management - zoned buddy allocator. )
408  MAYBE_BUILD_BUG_ON(HPAGE_PMD_ORDER < 2)
410  err = hugepage_init_sysfs( & hugepage_kobj)
411  If err Then Go to err_sysfs
414  err = khugepaged_init()
415  If err Then Go to err_slab
418  err = register_shrinker( & huge_zero_page_shrinker)
419  If err Then Go to err_hzp_shrinker
421  err = register_shrinker( & deferred_split_shrinker)
422  If err Then Go to err_split_shrinker
430  If totalram_pages() < 512 << 20 - PAGE_SHIFT determines the page size Then
431  By default, transparent hugepage support is disabled in order to avoid* risking an increased memory footprint for applications that are not* guaranteed to benefit from it. When transparent hugepage support is = 0
432  Return 0
435  err = start_stop_khugepaged()
436  If err Then Go to err_khugepaged
439  Return 0
440  err_khugepaged :
441  Remove one
442  err_split_shrinker :
443  Remove one
444  err_hzp_shrinker :
445  khugepaged_destroy()
446  err_slab :
447  hugepage_exit_sysfs(hugepage_kobj)
448  err_sysfs :
449  Return err