Lines Matching defs:cid

18 #include "cid.h"
214 * @sch->pshard never sees a partially-filled array or unpublished cid
301 * preempt the cid owner long after the starvation ended. While waiters remain,
680 * Return @rq's local DSQ if @sch holds the required caps on @rq's cid.
699 s32 cid = __scx_cpu_to_cid(cpu_of(rq));
750 p->scx.reenq_reason_cid = cid;
899 static u64 calc_effective_caps(struct scx_pshard *ps, s32 cid)
905 if (scx_cmask_test(cid, &ps->caps[cap_bit].cmask))
911 * queue_sync_ecaps - Queue ecaps update for a (sch, cid) pair
913 * @cid: cid to update
915 * Queue an ecaps update for @sch's @cid and kick the cpu so that it syncs in
918 static void queue_sync_ecaps(struct scx_sched *sch, s32 cid)
920 s32 cpu = __scx_cid_to_cpu(cid);
930 /* @cid's pshard->lock excludes concurrent queueing attempts */
950 * @rq: the cid's cpu rq
954 * transposed copy owned by the cid's cpu and written only here under @rq's
958 * learns the cid's idle state. Such a gain arms the per-rq
964 s32 cid, shard;
986 /* @cid is valid here: the cpu is active with queued syncs */
987 cid = __scx_cpu_to_cid(cpu);
988 shard = rcu_dereference_all(scx_cid_to_shard)[cid];
1003 ecaps = calc_effective_caps(ps, cid);
1011 * Tell the sched its effective caps on this cid changed. The
1064 * sync when bypass lifts, so without a replay a cid that never changes again
1074 s32 cid;
1085 cid = __scx_cpu_to_cid(cpu);
1086 ps = sch->pshard[rcu_dereference_all(scx_cid_to_shard)[cid]];
1089 queue_sync_ecaps(sch, cid);
1093 * A cpu came back. Re-seed each sub-sched's ecaps on the cpu's cid. The sync
1100 s32 cid, shard;
1114 cid = __scx_cpu_to_cid(cpu_of(rq));
1115 shard = rcu_dereference_all(scx_cid_to_shard)[cid];
1126 queue_sync_ecaps(pos, cid);
1211 * Processing them would decode the dead sched's pshards with the current cid
1777 * Unlike the root path, the cid shard layout is stable at this point.
2270 scx_error(parent, "sub-cap kfuncs require a cid-form scheduler");
2298 * @cmask__arena: cid cmask to grant @caps on
2302 * A cid in @cmask__arena is granted to the child only if the parent holds every
2306 * All-or-nothing keeps the caller-visible result binary per cid, so the denied
2309 * Return 0 on full success, -EPERM if any cid was refused, or a negative
2366 * requested cap on. All-or-nothing per cid.
2389 s32 cid;
2395 * the cid gains baseline access, so the holder
2396 * learns of an already-idle cid.
2398 scx_cmask_for_each_cid(cid, changed_cids)
2399 queue_sync_ecaps(child, cid);
2425 * @cmask__arena: cid cmask to revoke @caps on
2493 s32 cid;
2497 scx_cmask_for_each_cid(cid, changed_cids)
2498 queue_sync_ecaps(pos, cid);
2519 * Read the cap cmasks granted on each cid for self (@cgroup_id 0) or a direct
2541 scx_error(sch, "sub-cap kfuncs require a cid-form scheduler");
2568 * acquire also orders the cid table reads below against it.
2629 scx_error(parent, "sub-cap kfuncs require a cid-form scheduler");