Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:hugetlb_overcommit_handler

Proto:int hugetlb_overcommit_handler(struct ctl_table *table, int write, void __user *buffer, size_t *length, loff_t *ppos)

Type:int

Parameter:

TypeParameterName
struct ctl_table *table
intwrite
void __user *buffer
size_t *length
loff_t *ppos
3011  h = default_hstate
3015  If Not hugepages_supported() Then Return -EOPNOTSUPP
3018  tmp = nr_overcommit_huge_pages
3020  If write && hstate_is_gigantic(h) Then Return -EINVAL
3023  data = tmp
3024  maxlen = sizeof(unsignedlong)
3025  ret = read a vector of long integers with min/max values
3026  If ret Then Go to out
3029  If write Then
3030  spin_lock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.)
3031  nr_overcommit_huge_pages = tmp
3032  spin_unlock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.)
3034  out :
3035  Return ret