Lines Matching defs:pod
134 /* Layout of shards within one LLC pod */
400 * Each pod type describes how CPUs should be grouped for unbound workqueues.
405 cpumask_var_t *pod_cpus; /* pod -> cpus */
406 int *pod_node; /* pod -> node */
407 int *cpu_pod; /* cpu -> pod */
5127 int pod, node = NUMA_NO_NODE;
5139 /* If __pod_cpumask is contained inside a NUMA pod, that's our node */
5140 for (pod = 0; pod < pt->nr_pods; pod++) {
5141 if (cpumask_subset(attrs->__pod_cpumask, pt->pod_cpus[pod])) {
5142 node = pt->pod_node[pod];
5314 * wq_calc_pod_cpumask - calculate a wq_attrs' cpumask for a pod
5318 * Calculate the cpumask a workqueue with @attrs should use on @pod.
5321 * If pod affinity is not enabled, @attrs->cpumask is always used. If enabled
5322 * and @pod has online CPUs requested by @attrs, the returned cpumask is the
5323 * intersection of the possible CPUs of @pod and @attrs->cpumask.
5325 * The caller is responsible for ensuring that the cpumask of @pod stays stable.
5330 int pod = pt->cpu_pod[cpu];
5332 /* calculate possible CPUs in @pod that @attrs wants */
5333 cpumask_and(attrs->__pod_cpumask, pt->pod_cpus[pod], attrs->cpumask);
5334 /* does @pod have any online CPUs @attrs wants? */
5502 * a separate pwq to each CPU pod with possibles CPUs in @attrs->cpumask so that
5503 * work items are affine to the pod it was issued on. Older pwqs are released as
5529 * %CPU_DOWN_FAILED. @cpu is in the same pod of the CPU being hot[un]plugged.
5532 * If pod affinity can't be adjusted due to memory allocation failure, it falls
5535 * Note that when the last allowed CPU of a pod goes offline for a workqueue
5570 pr_warn("workqueue: allocation failed while updating CPU pod affinity of \"%s\"\n",
6841 /* update pod affinity of unbound workqueues */
6872 /* update pod affinity of unbound workqueues */
8152 * Initialize @pt by first initializing @pt->cpu_pod[] with pod IDs according to
8153 * @cpu_shares_pod(). Each subset of CPUs that share a pod is assigned a unique
8154 * and consecutive pod ID. The rest of @pt is initialized accordingly.
8159 int cur, pre, cpu, pod;
8185 for (pod = 0; pod < pt->nr_pods; pod++)
8186 BUG_ON(!zalloc_cpumask_var(&pt->pod_cpus[pod], GFP_KERNEL));
8213 /* Maps each CPU to its shard index within the LLC pod it belongs to */
8217 * llc_count_cores - count distinct cores (SMT groups) within an LLC pod
8218 * @pod_cpus: the cpumask of CPUs in the LLC pod
8219 * @smt_pods: the SMT pod type, used to identify sibling groups
8261 * llc_calc_shard_layout - compute the shard layout for an LLC pod
8262 * @nr_cores: number of distinct cores in the LLC pod
8296 * llc_populate_cpu_shard_id - populate cpu_shard_id[] for each CPU in an LLC pod
8297 * @pod_cpus: the cpumask of CPUs in the LLC pod
8298 * @smt_pods: the SMT pod type, used to identify sibling groups
8317 /* Iterate at every CPU for a given LLC pod, and assign it a shard */
8353 * Iterates over all LLC pods. For each pod, counts distinct cores then assigns
8354 * shard indices to all CPUs in the pod. Must be called after WQ_AFFN_CACHE and
8363 int pod;
8370 for (pod = 0; pod < llc_pods->nr_pods; pod++) {
8371 cpus_sharing_llc = llc_pods->pod_cpus[pod];
8383 * shard index. Used as the pod affinity callback for WQ_AFFN_CACHE_SHARD.
8419 * and CPU combinations to apply per-pod sharing.