Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:nr_overcommit_hugepages_store

Proto:static ssize_t nr_overcommit_hugepages_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t count)

Type:ssize_t

Parameter:

TypeParameterName
struct kobject *kobj
struct kobj_attribute *attr
const char *buf
size_tcount
2571  h = kobj_to_hstate(kobj, NULL)
2573  If hstate_is_gigantic(h) Then Return -EINVAL
2576  err = kstrtoul - convert a string to an unsigned long*@s: The start of the string. The string must be null-terminated, and may also* include a single newline before its terminating null. The first character* may also be a plus sign, but not a minus sign.
2577  If err Then Return err
2580  spin_lock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.)
2581  nr_overcommit_huge_pages = input
2582  spin_unlock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.)
2584  Return count