/Linux-v5.15/kernel/cgroup/ |
D | freezer.c | 14 static void cgroup_propagate_frozen(struct cgroup *cgrp, bool frozen) in cgroup_propagate_frozen() argument 24 while ((cgrp = cgroup_parent(cgrp))) { in cgroup_propagate_frozen() 26 cgrp->freezer.nr_frozen_descendants += desc; in cgroup_propagate_frozen() 27 if (!test_bit(CGRP_FROZEN, &cgrp->flags) && in cgroup_propagate_frozen() 28 test_bit(CGRP_FREEZE, &cgrp->flags) && in cgroup_propagate_frozen() 29 cgrp->freezer.nr_frozen_descendants == in cgroup_propagate_frozen() 30 cgrp->nr_descendants) { in cgroup_propagate_frozen() 31 set_bit(CGRP_FROZEN, &cgrp->flags); in cgroup_propagate_frozen() 32 cgroup_file_notify(&cgrp->events_file); in cgroup_propagate_frozen() 33 TRACE_CGROUP_PATH(notify_frozen, cgrp, 1); in cgroup_propagate_frozen() [all …]
|
D | rstat.c | 9 static void cgroup_base_stat_flush(struct cgroup *cgrp, int cpu); 11 static struct cgroup_rstat_cpu *cgroup_rstat_cpu(struct cgroup *cgrp, int cpu) in cgroup_rstat_cpu() argument 13 return per_cpu_ptr(cgrp->rstat_cpu, cpu); in cgroup_rstat_cpu() 25 void cgroup_rstat_updated(struct cgroup *cgrp, int cpu) in cgroup_rstat_updated() argument 38 if (cgroup_rstat_cpu(cgrp, cpu)->updated_next) in cgroup_rstat_updated() 45 struct cgroup_rstat_cpu *rstatc = cgroup_rstat_cpu(cgrp, cpu); in cgroup_rstat_updated() 46 struct cgroup *parent = cgroup_parent(cgrp); in cgroup_rstat_updated() 58 rstatc->updated_next = cgrp; in cgroup_rstat_updated() 64 prstatc->updated_children = cgrp; in cgroup_rstat_updated() 66 cgrp = parent; in cgroup_rstat_updated() [all …]
|
D | cgroup.c | 165 struct cgroup_root cgrp_dfl_root = { .cgrp.rstat_cpu = &cgrp_dfl_root_rstat_cpu }; 236 static int cgroup_apply_control(struct cgroup *cgrp); 237 static void cgroup_finalize_control(struct cgroup *cgrp, int ret); 240 static int cgroup_destroy_locked(struct cgroup *cgrp); 241 static struct cgroup_subsys_state *css_create(struct cgroup *cgrp, 246 struct cgroup *cgrp, struct cftype cfts[], 312 bool cgroup_on_dfl(const struct cgroup *cgrp) in cgroup_on_dfl() argument 314 return cgrp->root == &cgrp_dfl_root; in cgroup_on_dfl() 348 static bool cgroup_has_tasks(struct cgroup *cgrp) in cgroup_has_tasks() argument 350 return cgrp->nr_populated_csets; in cgroup_has_tasks() [all …]
|
D | cgroup-internal.h | 28 #define TRACE_CGROUP_PATH(type, cgrp, ...) \ argument 34 cgroup_path(cgrp, trace_cgroup_path, \ 36 trace_cgroup_##type(cgrp, trace_cgroup_path, \ 78 struct cgroup *cgrp; member 168 static inline bool cgroup_is_dead(const struct cgroup *cgrp) in cgroup_is_dead() argument 170 return !(cgrp->self.flags & CSS_ONLINE); in cgroup_is_dead() 173 static inline bool notify_on_release(const struct cgroup *cgrp) in notify_on_release() argument 175 return test_bit(CGRP_NOTIFY_ON_RELEASE, &cgrp->flags); in notify_on_release() 206 bool cgroup_on_dfl(const struct cgroup *cgrp); 207 bool cgroup_is_thread_root(struct cgroup *cgrp); [all …]
|
D | cgroup-v1.c | 199 void cgroup1_pidlist_destroy_all(struct cgroup *cgrp) in cgroup1_pidlist_destroy_all() argument 203 mutex_lock(&cgrp->pidlist_mutex); in cgroup1_pidlist_destroy_all() 204 list_for_each_entry_safe(l, tmp_l, &cgrp->pidlists, links) in cgroup1_pidlist_destroy_all() 206 mutex_unlock(&cgrp->pidlist_mutex); in cgroup1_pidlist_destroy_all() 209 BUG_ON(!list_empty(&cgrp->pidlists)); in cgroup1_pidlist_destroy_all() 280 static struct cgroup_pidlist *cgroup_pidlist_find(struct cgroup *cgrp, in cgroup_pidlist_find() argument 287 lockdep_assert_held(&cgrp->pidlist_mutex); in cgroup_pidlist_find() 289 list_for_each_entry(l, &cgrp->pidlists, links) in cgroup_pidlist_find() 301 static struct cgroup_pidlist *cgroup_pidlist_find_create(struct cgroup *cgrp, in cgroup_pidlist_find_create() argument 306 lockdep_assert_held(&cgrp->pidlist_mutex); in cgroup_pidlist_find_create() [all …]
|
D | debug.c | 101 struct cgroup *c = link->cgrp; in current_css_set_cg_links_read() 206 struct cgroup *cgrp; in cgroup_subsys_states_read() local 212 cgrp = cgroup_kn_lock_live(of->kn, false); in cgroup_subsys_states_read() 213 if (!cgrp) in cgroup_subsys_states_read() 217 css = rcu_dereference_check(cgrp->subsys[ss->id], true); in cgroup_subsys_states_read() 258 struct cgroup *cgrp; in cgroup_masks_read() local 260 cgrp = cgroup_kn_lock_live(of->kn, false); in cgroup_masks_read() 261 if (!cgrp) in cgroup_masks_read() 264 cgroup_masks_read_one(seq, "subtree_control", cgrp->subtree_control); in cgroup_masks_read() 265 cgroup_masks_read_one(seq, "subtree_ss_mask", cgrp->subtree_ss_mask); in cgroup_masks_read()
|
/Linux-v5.15/tools/perf/util/ |
D | cgroup.c | 51 int read_cgroup_id(struct cgroup *cgrp) in read_cgroup_id() argument 64 scnprintf(path, PATH_MAX, "%s/%s", mnt, cgrp->name); in read_cgroup_id() 70 cgrp->id = handle.cgroup_id; in read_cgroup_id() 100 if (!counter->cgrp) in evlist__find_cgroup() 102 if (!strcmp(counter->cgrp->name, str)) in evlist__find_cgroup() 103 return cgroup__get(counter->cgrp); in evlist__find_cgroup() 148 struct cgroup *cgrp = evlist__findnew_cgroup(evlist, str); in add_cgroup() local 151 if (!cgrp) in add_cgroup() 164 cgroup__put(cgrp); in add_cgroup() 167 counter->cgrp = cgrp; in add_cgroup() [all …]
|
D | bpf_counter_cgroup.c | 48 struct cgroup *cgrp, *leader_cgrp; in bperf_load_program() local 109 cgrp = NULL; in bperf_load_program() 113 if (cgrp == NULL || evsel->cgrp == leader_cgrp) { in bperf_load_program() 114 leader_cgrp = evsel->cgrp; in bperf_load_program() 115 evsel->cgrp = NULL; in bperf_load_program() 138 evsel->cgrp = leader_cgrp; in bperf_load_program() 142 if (evsel->cgrp == cgrp) in bperf_load_program() 145 cgrp = evsel->cgrp; in bperf_load_program() 147 if (read_cgroup_id(cgrp) < 0) { in bperf_load_program() 154 err = bpf_map_update_elem(map_fd, &cgrp->id, &i, BPF_ANY); in bperf_load_program() [all …]
|
D | stat-shadow.c | 34 struct cgroup *cgrp; member 64 if (a->cgrp != b->cgrp) in saved_value_cmp() 65 return (char *)a->cgrp < (char *)b->cgrp ? -1 : +1; in saved_value_cmp() 111 struct cgroup *cgrp) in saved_value_lookup() argument 121 .cgrp = cgrp, in saved_value_lookup() 209 struct cgroup *cgrp; member 218 rsd->ctx, st, rsd->cgrp); in update_runtime_stat() 236 .cgrp = counter->cgrp, in perf_stat__update_shadow_stats() 317 rsd.cgrp); in perf_stat__update_shadow_stats() 323 cpu, true, STAT_NONE, 0, st, rsd.cgrp); in perf_stat__update_shadow_stats() [all …]
|
D | cgroup.h | 44 int read_cgroup_id(struct cgroup *cgrp); 46 static inline int read_cgroup_id(struct cgroup *cgrp __maybe_unused) in read_cgroup_id()
|
/Linux-v5.15/include/linux/ |
D | cgroup.h | 310 static inline u64 cgroup_id(const struct cgroup *cgrp) in cgroup_id() argument 312 return cgrp->kn->id; in cgroup_id() 420 static inline void cgroup_get(struct cgroup *cgrp) in cgroup_get() argument 422 css_get(&cgrp->self); in cgroup_get() 425 static inline bool cgroup_tryget(struct cgroup *cgrp) in cgroup_tryget() argument 427 return css_tryget(&cgrp->self); in cgroup_tryget() 430 static inline void cgroup_put(struct cgroup *cgrp) in cgroup_put() argument 432 css_put(&cgrp->self); in cgroup_put() 553 static inline struct cgroup *cgroup_parent(struct cgroup *cgrp) in cgroup_parent() argument 555 struct cgroup_subsys_state *parent_css = cgrp->self.parent; in cgroup_parent() [all …]
|
D | psi.h | 29 int psi_cgroup_alloc(struct cgroup *cgrp); 30 void psi_cgroup_free(struct cgroup *cgrp); 49 static inline int psi_cgroup_alloc(struct cgroup *cgrp) in psi_cgroup_alloc() argument 53 static inline void psi_cgroup_free(struct cgroup *cgrp) in psi_cgroup_free() argument
|
D | bpf-cgroup.h | 157 int cgroup_bpf_inherit(struct cgroup *cgrp); 158 void cgroup_bpf_offline(struct cgroup *cgrp); 160 int __cgroup_bpf_attach(struct cgroup *cgrp, 164 int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog, 167 int __cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr, 171 int cgroup_bpf_attach(struct cgroup *cgrp, 175 int cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog, 177 int cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr, 475 static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; } in cgroup_bpf_inherit() argument 476 static inline void cgroup_bpf_offline(struct cgroup *cgrp) {} in cgroup_bpf_offline() argument
|
/Linux-v5.15/include/trace/events/ |
D | cgroup.h | 56 TP_PROTO(struct cgroup *cgrp, const char *path), 58 TP_ARGS(cgrp, path), 68 __entry->root = cgrp->root->hierarchy_id; 69 __entry->id = cgroup_id(cgrp); 70 __entry->level = cgrp->level; 80 TP_PROTO(struct cgroup *cgrp, const char *path), 82 TP_ARGS(cgrp, path) 87 TP_PROTO(struct cgroup *cgrp, const char *path), 89 TP_ARGS(cgrp, path) 94 TP_PROTO(struct cgroup *cgrp, const char *path), [all …]
|
/Linux-v5.15/kernel/bpf/ |
D | cgroup.c | 25 void cgroup_bpf_offline(struct cgroup *cgrp) in cgroup_bpf_offline() argument 27 cgroup_get(cgrp); in cgroup_bpf_offline() 28 percpu_ref_kill(&cgrp->bpf.refcnt); in cgroup_bpf_offline() 43 struct cgroup *cgrp) in bpf_cgroup_storages_alloc() argument 49 key.cgroup_inode_id = cgroup_id(cgrp); in bpf_cgroup_storages_alloc() 83 struct cgroup *cgrp, in bpf_cgroup_storages_link() argument 89 bpf_cgroup_storage_link(storages[stype], cgrp, attach_type); in bpf_cgroup_storages_link() 110 struct cgroup *p, *cgrp = container_of(work, struct cgroup, in cgroup_bpf_release() local 113 struct list_head *storages = &cgrp->bpf.storages; in cgroup_bpf_release() 120 for (atype = 0; atype < ARRAY_SIZE(cgrp->bpf.progs); atype++) { in cgroup_bpf_release() [all …]
|
/Linux-v5.15/tools/testing/selftests/bpf/ |
D | test_sockmap.c | 1332 static int __test_exec(int cgrp, int test, struct sockmap_options *opt) in __test_exec() argument 1356 err = run_options(opt, cgrp, test); in __test_exec() 1365 static void test_exec(int cgrp, struct sockmap_options *opt) in test_exec() argument 1372 err = __test_exec(cgrp, SENDMSG, opt); in test_exec() 1377 err = __test_exec(cgrp, SENDPAGE, opt); in test_exec() 1383 static void test_send_one(struct sockmap_options *opt, int cgrp) in test_send_one() argument 1388 test_exec(cgrp, opt); in test_send_one() 1393 test_exec(cgrp, opt); in test_send_one() 1398 test_exec(cgrp, opt); in test_send_one() 1402 static void test_send_many(struct sockmap_options *opt, int cgrp) in test_send_many() argument [all …]
|
/Linux-v5.15/net/netfilter/ |
D | xt_cgroup.c | 39 struct cgroup *cgrp; in cgroup_mt_check_v1() local 56 cgrp = cgroup_get_from_path(info->path); in cgroup_mt_check_v1() 57 if (IS_ERR(cgrp)) { in cgroup_mt_check_v1() 59 PTR_ERR(cgrp)); in cgroup_mt_check_v1() 62 info->priv = cgrp; in cgroup_mt_check_v1() 71 struct cgroup *cgrp; in cgroup_mt_check_v2() local 88 cgrp = cgroup_get_from_path(info->path); in cgroup_mt_check_v2() 89 if (IS_ERR(cgrp)) { in cgroup_mt_check_v2() 91 PTR_ERR(cgrp)); in cgroup_mt_check_v2() 94 info->priv = cgrp; in cgroup_mt_check_v2()
|
D | nft_socket.c | 42 struct cgroup *cgrp; in nft_sock_get_eval_cgroupv2() local 47 cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data); in nft_sock_get_eval_cgroupv2() 48 if (level > cgrp->level) in nft_sock_get_eval_cgroupv2() 51 memcpy(dest, &cgrp->ancestor_ids[level], sizeof(u64)); in nft_sock_get_eval_cgroupv2()
|
/Linux-v5.15/drivers/gpu/drm/nouveau/nvkm/engine/fifo/ |
D | gpfifogk104.c | 44 struct nvkm_fifo_cgrp *cgrp = chan->cgrp; in gk104_fifo_gpfifo_kick_locked() local 47 if (cgrp) in gk104_fifo_gpfifo_kick_locked() 48 nvkm_wr32(device, 0x002634, cgrp->id | 0x01000000); in gk104_fifo_gpfifo_kick_locked() 56 cgrp ? "tsg" : "channel", in gk104_fifo_gpfifo_kick_locked() 57 cgrp ? cgrp->id : chan->base.chid, client->name); in gk104_fifo_gpfifo_kick_locked() 235 kfree(chan->cgrp); in gk104_fifo_gpfifo_dtor() 287 if (!(chan->cgrp = kmalloc(sizeof(*chan->cgrp), GFP_KERNEL))) in gk104_fifo_gpfifo_new_() 289 chan->cgrp->id = chan->base.chid; in gk104_fifo_gpfifo_new_() 290 INIT_LIST_HEAD(&chan->cgrp->head); in gk104_fifo_gpfifo_new_() 291 INIT_LIST_HEAD(&chan->cgrp->chan); in gk104_fifo_gpfifo_new_() [all …]
|
D | gk110.c | 33 gk110_fifo_runlist_cgrp(struct nvkm_fifo_cgrp *cgrp, in gk110_fifo_runlist_cgrp() argument 36 nvkm_wo32(memory, offset + 0, (cgrp->chan_nr << 26) | (128 << 18) | in gk110_fifo_runlist_cgrp() 37 (3 << 14) | 0x00002000 | cgrp->id); in gk110_fifo_runlist_cgrp() 44 .cgrp = gk110_fifo_runlist_cgrp,
|
D | gk104.c | 172 struct nvkm_fifo_cgrp *cgrp; in gk104_fifo_runlist_update() local 184 list_for_each_entry(cgrp, &fifo->runlist[runl].cgrp, head) { in gk104_fifo_runlist_update() 185 func->cgrp(cgrp, mem, nr++ * func->size); in gk104_fifo_runlist_update() 186 list_for_each_entry(chan, &cgrp->chan, head) { in gk104_fifo_runlist_update() 199 struct nvkm_fifo_cgrp *cgrp = chan->cgrp; in gk104_fifo_runlist_remove() local 203 if (cgrp && !--cgrp->chan_nr) in gk104_fifo_runlist_remove() 204 list_del_init(&cgrp->head); in gk104_fifo_runlist_remove() 212 struct nvkm_fifo_cgrp *cgrp = chan->cgrp; in gk104_fifo_runlist_insert() local 214 if (cgrp) { in gk104_fifo_runlist_insert() 215 if (!cgrp->chan_nr++) in gk104_fifo_runlist_insert() [all …]
|
D | gv100.c | 46 gv100_fifo_runlist_cgrp(struct nvkm_fifo_cgrp *cgrp, in gv100_fifo_runlist_cgrp() argument 50 nvkm_wo32(memory, offset + 0x4, cgrp->chan_nr); in gv100_fifo_runlist_cgrp() 51 nvkm_wo32(memory, offset + 0x8, cgrp->id); in gv100_fifo_runlist_cgrp() 58 .cgrp = gv100_fifo_runlist_cgrp,
|
D | gpfifogv100.c | 158 if (!(chan->cgrp = kmalloc(sizeof(*chan->cgrp), GFP_KERNEL))) in gv100_fifo_gpfifo_new_() 160 chan->cgrp->id = chan->base.chid; in gv100_fifo_gpfifo_new_() 161 INIT_LIST_HEAD(&chan->cgrp->head); in gv100_fifo_gpfifo_new_() 162 INIT_LIST_HEAD(&chan->cgrp->chan); in gv100_fifo_gpfifo_new_() 163 chan->cgrp->chan_nr = 0; in gv100_fifo_gpfifo_new_()
|
D | tu102.c | 55 .cgrp = gv100_fifo_runlist_cgrp, 176 struct nvkm_fifo_cgrp *cgrp; in tu102_fifo_recover_chid() local 185 list_for_each_entry(cgrp, &fifo->runlist[runl].cgrp, head) { in tu102_fifo_recover_chid() 186 if (cgrp->id == chid) { in tu102_fifo_recover_chid() 187 chan = list_first_entry(&cgrp->chan, typeof(*chan), head); in tu102_fifo_recover_chid() 189 if (!--cgrp->chan_nr) in tu102_fifo_recover_chid() 190 list_del_init(&cgrp->head); in tu102_fifo_recover_chid()
|
/Linux-v5.15/tools/perf/util/bpf_skel/ |
D | bperf_cgroup.bpf.c | 55 struct cgroup *cgrp; in get_cgroup_v1_idx() local 61 cgrp = BPF_CORE_READ(p, cgroups, subsys[perf_event_cgrp_id], cgroup); in get_cgroup_v1_idx() 62 level = BPF_CORE_READ(cgrp, level); in get_cgroup_v1_idx() 71 cgrp_id = BPF_CORE_READ(cgrp, ancestor_ids[i]); in get_cgroup_v1_idx() 117 __u32 key, cgrp; in bperf_cgroup_count() local 157 cgrp = cgrp_idx[c]; in bperf_cgroup_count() 160 key = cgrp * num_events + idx; in bperf_cgroup_count()
|