函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\hugetlb.c Create Date:2022-07-27 16:59:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Register hstate attributes for a single node device.* No-op if attributes already registered.

函数原型:static void hugetlb_register_node(struct node *node)

返回类型:void

参数:

类型参数名称
struct node *node
2765  nhs等于node_hstates[id]
2768  如果hugepages_kobj则返回
2771  hugepages_kobj等于kobject_create_and_add() - Create a struct kobject dynamically and* register it with sysfs.*@name: the name for the kobject*@parent: the parent kobject of this kobject, if any.* This function creates a kobject structure dynamically and registers it
2773  如果非hugepages_kobj则返回
2777  err等于hugetlb_sysfs_add_hstate(h, hugepages_kobj, hstate_kobjs, & per_node_hstate_attr_group)
2780  如果err
2781  打印错误信息("Hugetlb: Unable to add hstate %s for node %d\n", name, id)
2783  Unregister hstate attributes from a single node device.* No-op if no hstate attributes attached.
2784  退出
调用者
名称描述
hugetlb_register_all_nodeshugetlb 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.