Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:static inline int alloc_cpumasks(struct cpuset *cs, struct tmpmasks *tmp)

Type:int

Parameter:

TypeParameterName
struct cpuset *cs
struct tmpmasks *tmp
464  If cs Then
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  Else
469  pmask1 = For update_cpumasks_hier()
470  pmask2 = addmask
471  pmask3 = For partition root
474  If Not zalloc_cpumask_var(pmask1, GFP_KERNEL) Then Return -ENOMEM
477  If Not zalloc_cpumask_var(pmask2, GFP_KERNEL) Then Go to free_one
480  If Not zalloc_cpumask_var(pmask3, GFP_KERNEL) Then Go to free_two
483  Return 0
485  free_two :
486  free_cpumask_var( * pmask2)
487  free_one :
488  free_cpumask_var( * pmask1)
489  Return -ENOMEM
Caller
NameDescribe
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.