函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:alloc_cpumasks - allocate three cpumasks for cpuset*@cs: the cpuset that have cpumasks to be allocated.*@tmp: the tmpmasks structure pointer* Return: 0 if successful, -ENOMEM otherwise.* Only one of the two input arguments should be non-NULL.

函数原型:static inline int alloc_cpumasks(struct cpuset *cs, struct tmpmasks *tmp)

返回类型:int

参数:

类型参数名称
struct cpuset *cs
struct tmpmasks *tmp
464  如果cs
465  pmask1等于 user-configured CPUs and Memory Nodes allow to tasks
466  pmask2等于 effective CPUs and Memory Nodes allow to tasks
467  pmask3等于* CPUs allocated to child sub-partitions (default hierarchy only) * - CPUs granted by the parent = effective_cpus U subparts_cpus * - effective_cpus and subparts_cpus are mutually exclusive. * effective_cpus contains only onlined CPUs, but subparts_cpus *
468  否则
469  pmask1等于For update_cpumasks_hier()
470  pmask2等于addmask
471  pmask3等于For partition root
474  如果非zalloc_cpumask_var(pmask1, GFP_KERNEL)则返回:负ENOMEM
477  如果非zalloc_cpumask_var(pmask2, GFP_KERNEL)则转到:free_one
480  如果非zalloc_cpumask_var(pmask3, GFP_KERNEL)则转到:free_two
483  返回:0
485  free_two :
486  释放CPU掩码
487  free_one :
488  释放CPU掩码
489  返回:负ENOMEM
调用者
名称描述
alloc_trial_cpusetalloc_trial_cpuset - allocate a trial cpuset*@cs: the cpuset that the trial cpuset duplicates
update_prstatepdate_prstate - update partititon_root_state* Call with cpuset_mutex held.
cpuset_css_allocpuset_css_alloc - allocate a cpuset css* cgrp: control group that the new cpuset will be part of
cpuset_hotplug_workfnCPU / memory hotplug is handled asynchronously.