Lines Matching defs:pshard
121 static void free_pshard(struct scx_pshard *pshard)
125 if (!pshard)
127 cu = &pshard->caps_updated;
129 scx_arena_free(pshard->sch, cu->cmask_arena_out,
131 SCX_CMASK_NR_WORDS(pshard->nr_cids)));
132 kfree(pshard);
139 if (!sch->pshard)
142 free_pshard(sch->pshard[si]);
143 kfree(sch->pshard);
153 struct scx_pshard *pshard;
157 pshard = kzalloc_node(sizeof(*pshard), GFP_KERNEL, node);
158 if (!pshard)
161 raw_spin_lock_init(&pshard->lock);
162 pshard->sch = sch;
163 pshard->base = shard->base_cid;
164 pshard->nr_cids = shard->nr_cids;
167 scx_cmask_init(&pshard->caps[i].cmask, shard->base_cid, shard->nr_cids);
169 cu = &pshard->caps_updated;
176 free_pshard(pshard);
182 return pshard;
187 struct scx_pshard **pshard;
197 pshard = kzalloc_objs(pshard[0], scx_nr_cid_shards);
198 if (!pshard)
202 pshard[si] = alloc_pshard(sch, si, shard_node[si]);
203 if (!pshard[si]) {
205 free_pshard(pshard[si]);
206 kfree(pshard);
214 * @sch->pshard never sees a partially-filled array or unpublished cid
219 WRITE_ONCE(sch->pshard, pshard);
232 struct scx_pshard *ps = sch->pshard[si];
888 struct scx_pshard *ps = sch->pshard[si];
930 /* @cid's pshard->lock excludes concurrent queueing attempts */
949 * scx_process_sync_ecaps - Sync this cpu's ecaps to pshard->caps[]
953 * pshard->caps[] is the target configuration. pcpu->ecaps is the effective
994 struct scx_pshard *ps = pcpu->sch->pshard[shard];
1086 ps = sch->pshard[rcu_dereference_all(scx_cid_to_shard)[cid]];
1094 * recomputes effective caps from the pshard and fires ops.sub_ecaps_updated()
1124 ps = pos->pshard[shard];
1765 * never becomes visible with an unallocated pshard.
1774 * Allocate pshard[] before scx_link_sched() publishes @sch into the
1776 * would otherwise dereference sch->pshard[si] while it's still NULL.
2346 struct scx_pshard *pps = parent->pshard[si];
2347 struct scx_pshard *cps = child->pshard[si];
2429 * its descendants. The origin parent's pshard lock is held across the subtree
2465 guard(raw_spinlock)(&parent->pshard[si]->lock);
2468 struct scx_pshard *ps = pos->pshard[si];
2531 struct scx_pshard **pshard;
2567 * scx_alloc_pshards(): a non-NULL pshard has every element set and the
2570 pshard = smp_load_acquire(&target->pshard);
2571 if (unlikely(!pshard)) {
2589 scx_cmask_or(local_out, &pshard[si]->caps[cap_bit].cmask);