Lines Matching refs:numgrps
124 * The actual allocated total groups may be less than @numgrps when
125 * active total CPU number is less than @numgrps.
130 static void alloc_nodes_groups(unsigned int numgrps,
156 numgrps = min_t(unsigned, remaining_ncpus, numgrps);
163 * node's nr_cpus to remaining un-assigned ncpus. 'numgrps' is
170 * other nodes will be allocated >= 1 groups, since 'numgrps' is
225 * and we always re-calculate 'remaining_ncpus' & 'numgrps', and
235 WARN_ON_ONCE(numgrps == 0);
239 numgrps * ncpus / remaining_ncpus);
245 numgrps -= ngroups;
249 static int __group_cpus_evenly(unsigned int startgrp, unsigned int numgrps,
255 unsigned int last_grp = numgrps;
269 if (numgrps <= nodes) {
277 return numgrps;
287 alloc_nodes_groups(numgrps, node_to_cpumask, cpu_mask,
334 * @numgrps: number of groups
347 struct cpumask *group_cpus_evenly(unsigned int numgrps)
365 masks = kcalloc(numgrps, sizeof(*masks), GFP_KERNEL);
386 ret = __group_cpus_evenly(curgrp, numgrps, node_to_cpumask,
398 if (nr_present >= numgrps)
403 ret = __group_cpus_evenly(curgrp, numgrps, node_to_cpumask,
410 WARN_ON(nr_present + nr_others < numgrps);
427 struct cpumask *group_cpus_evenly(unsigned int numgrps)
429 struct cpumask *masks = kcalloc(numgrps, sizeof(*masks), GFP_KERNEL);