Lines Matching refs:cu
123 struct scx_caps_updated *cu; in free_pshard() local
127 cu = &pshard->caps_updated; in free_pshard()
128 if (cu->cmask_arena_out) in free_pshard()
129 scx_arena_free(pshard->sch, cu->cmask_arena_out, in free_pshard()
154 struct scx_caps_updated *cu; in alloc_pshard() local
169 cu = &pshard->caps_updated; in alloc_pshard()
170 raw_spin_lock_init(&cu->lock); in alloc_pshard()
171 INIT_LIST_HEAD(&cu->node_in_flight); in alloc_pshard()
172 __scx_cmask_init(&cu->cmask, shard->base_cid, shard->nr_cids, SCX_CID_SHARD_MAX_CPUS); in alloc_pshard()
174 cu->cmask_arena_out = scx_arena_alloc(sch, cmask_size); in alloc_pshard()
175 if (!cu->cmask_arena_out) { in alloc_pshard()
180 scx_cmask_init(cu->cmask_arena_out, shard->base_cid, shard->nr_cids); in alloc_pshard()
826 struct scx_caps_updated *cu = &ps->caps_updated; in caps_updated_record() local
828 guard(raw_spinlock)(&cu->lock); in caps_updated_record()
829 scx_cmask_or(&cu->cmask, cids); in caps_updated_record()
830 cu->caps |= caps; in caps_updated_record()
831 if (list_empty(&cu->node_in_flight)) in caps_updated_record()
832 list_add_tail(&cu->node_in_flight, to_deliver); in caps_updated_record()
838 struct scx_caps_updated *cu, *tmp; in caps_updated_deliver() local
840 list_for_each_entry_safe(cu, tmp, to_deliver, node_in_flight) { in caps_updated_deliver()
841 struct scx_pshard *ps = container_of(cu, struct scx_pshard, caps_updated); in caps_updated_deliver()
854 scoped_guard (raw_spinlock, &cu->lock) { in caps_updated_deliver()
855 if (cu->caps && SCX_HAS_OP(sch, sub_caps_updated) && in caps_updated_deliver()
859 caps = cu->caps; in caps_updated_deliver()
860 scx_cmask_ref_init_kern(sch, cu->cmask_arena_out, in caps_updated_deliver()
862 scx_cmask_ref_copy(&ref, &cu->cmask); in caps_updated_deliver()
863 scx_cmask_clear(&cu->cmask); in caps_updated_deliver()
864 cu->caps = 0; in caps_updated_deliver()
866 list_del_init(&cu->node_in_flight); in caps_updated_deliver()
873 SCX_CALL_OP(sch, sub_caps_updated, NULL, cu->cmask_arena_out, caps); in caps_updated_deliver()
892 struct scx_caps_updated *cu = &ps->caps_updated; in scx_sub_seed_caps() local
894 scoped_guard (raw_spinlock, &cu->lock) { in scx_sub_seed_caps()
895 if (cu->caps && list_empty(&cu->node_in_flight)) in scx_sub_seed_caps()
896 list_add_tail(&cu->node_in_flight, &to_deliver); in scx_sub_seed_caps()