Home
last modified time | relevance | path

Searched refs:cgrp (Results 1 – 25 of 54) sorted by relevance

123

/linux-5.19.10/kernel/cgroup/
Dfreezer.c14 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 …]
Drstat.c9 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 (data_race(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 …]
Dcgroup.c166 struct cgroup_root cgrp_dfl_root = { .cgrp.rstat_cpu = &cgrp_dfl_root_rstat_cpu };
237 static int cgroup_apply_control(struct cgroup *cgrp);
238 static void cgroup_finalize_control(struct cgroup *cgrp, int ret);
241 static int cgroup_destroy_locked(struct cgroup *cgrp);
242 static struct cgroup_subsys_state *css_create(struct cgroup *cgrp,
247 struct cgroup *cgrp, struct cftype cfts[],
313 bool cgroup_on_dfl(const struct cgroup *cgrp) in cgroup_on_dfl() argument
315 return cgrp->root == &cgrp_dfl_root; in cgroup_on_dfl()
349 static bool cgroup_has_tasks(struct cgroup *cgrp) in cgroup_has_tasks() argument
351 return cgrp->nr_populated_csets; in cgroup_has_tasks()
[all …]
Dcgroup-internal.h27 #define TRACE_CGROUP_PATH(type, cgrp, ...) \ argument
33 cgroup_path(cgrp, trace_cgroup_path, \
35 trace_cgroup_##type(cgrp, trace_cgroup_path, \
96 struct cgroup *cgrp; member
186 static inline bool cgroup_is_dead(const struct cgroup *cgrp) in cgroup_is_dead() argument
188 return !(cgrp->self.flags & CSS_ONLINE); in cgroup_is_dead()
191 static inline bool notify_on_release(const struct cgroup *cgrp) in notify_on_release() argument
193 return test_bit(CGRP_NOTIFY_ON_RELEASE, &cgrp->flags); in notify_on_release()
224 bool cgroup_on_dfl(const struct cgroup *cgrp);
225 bool cgroup_is_thread_root(struct cgroup *cgrp);
[all …]
Dcgroup-v1.c196 void cgroup1_pidlist_destroy_all(struct cgroup *cgrp) in cgroup1_pidlist_destroy_all() argument
200 mutex_lock(&cgrp->pidlist_mutex); in cgroup1_pidlist_destroy_all()
201 list_for_each_entry_safe(l, tmp_l, &cgrp->pidlists, links) in cgroup1_pidlist_destroy_all()
203 mutex_unlock(&cgrp->pidlist_mutex); in cgroup1_pidlist_destroy_all()
206 BUG_ON(!list_empty(&cgrp->pidlists)); in cgroup1_pidlist_destroy_all()
277 static struct cgroup_pidlist *cgroup_pidlist_find(struct cgroup *cgrp, in cgroup_pidlist_find() argument
284 lockdep_assert_held(&cgrp->pidlist_mutex); in cgroup_pidlist_find()
286 list_for_each_entry(l, &cgrp->pidlists, links) in cgroup_pidlist_find()
298 static struct cgroup_pidlist *cgroup_pidlist_find_create(struct cgroup *cgrp, in cgroup_pidlist_find_create() argument
303 lockdep_assert_held(&cgrp->pidlist_mutex); in cgroup_pidlist_find_create()
[all …]
Ddebug.c101 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-5.19.10/tools/perf/util/
Dcgroup.c51 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 …]
Dbpf_counter_cgroup.c48 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()
137 evsel->cgrp = leader_cgrp; in bperf_load_program()
141 if (evsel->cgrp == cgrp) in bperf_load_program()
144 cgrp = evsel->cgrp; in bperf_load_program()
146 if (read_cgroup_id(cgrp) < 0) { in bperf_load_program()
153 err = bpf_map_update_elem(map_fd, &cgrp->id, &i, BPF_ANY); in bperf_load_program()
[all …]
Dbpf_off_cpu.c150 if (evlist__first(evlist)->cgrp) { in off_cpu_prepare()
200 if (evlist__first(evlist)->cgrp) { in off_cpu_prepare()
208 struct cgroup *cgrp = evsel->cgrp; in off_cpu_prepare() local
210 if (cgrp == NULL) in off_cpu_prepare()
213 if (!cgrp->id && read_cgroup_id(cgrp) < 0) { in off_cpu_prepare()
215 cgrp->name); in off_cpu_prepare()
219 bpf_map_update_elem(fd, &cgrp->id, &val, BPF_ANY); in off_cpu_prepare()
/linux-5.19.10/include/linux/
Dcgroup.h310 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()
554 static inline struct cgroup *cgroup_parent(struct cgroup *cgrp) in cgroup_parent() argument
556 struct cgroup_subsys_state *parent_css = cgrp->self.parent; in cgroup_parent()
[all …]
Dpsi.h37 int psi_cgroup_alloc(struct cgroup *cgrp);
38 void psi_cgroup_free(struct cgroup *cgrp);
50 static inline int psi_cgroup_alloc(struct cgroup *cgrp) in psi_cgroup_alloc() argument
54 static inline void psi_cgroup_free(struct cgroup *cgrp) in psi_cgroup_free() argument
/linux-5.19.10/include/trace/events/
Dcgroup.h56 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-5.19.10/kernel/bpf/
Dcgroup.c29 bpf_prog_run_array_cg(const struct cgroup_bpf *cgrp, in bpf_prog_run_array_cg() argument
44 array = rcu_dereference(cgrp->effective[atype]); in bpf_prog_run_array_cg()
64 void cgroup_bpf_offline(struct cgroup *cgrp) in cgroup_bpf_offline() argument
66 cgroup_get(cgrp); in cgroup_bpf_offline()
67 percpu_ref_kill(&cgrp->bpf.refcnt); in cgroup_bpf_offline()
82 struct cgroup *cgrp) in bpf_cgroup_storages_alloc() argument
88 key.cgroup_inode_id = cgroup_id(cgrp); in bpf_cgroup_storages_alloc()
122 struct cgroup *cgrp, in bpf_cgroup_storages_link() argument
128 bpf_cgroup_storage_link(storages[stype], cgrp, attach_type); in bpf_cgroup_storages_link()
149 struct cgroup *p, *cgrp = container_of(work, struct cgroup, in cgroup_bpf_release() local
[all …]
/linux-5.19.10/tools/testing/selftests/bpf/
Dtest_sockmap.c1343 static int __test_exec(int cgrp, int test, struct sockmap_options *opt) in __test_exec() argument
1367 err = run_options(opt, cgrp, test); in __test_exec()
1376 static void test_exec(int cgrp, struct sockmap_options *opt) in test_exec() argument
1383 err = __test_exec(cgrp, SENDMSG, opt); in test_exec()
1388 err = __test_exec(cgrp, SENDPAGE, opt); in test_exec()
1394 static void test_send_one(struct sockmap_options *opt, int cgrp) in test_send_one() argument
1399 test_exec(cgrp, opt); in test_send_one()
1404 test_exec(cgrp, opt); in test_send_one()
1409 test_exec(cgrp, opt); in test_send_one()
1413 static void test_send_many(struct sockmap_options *opt, int cgrp) in test_send_many() argument
[all …]
/linux-5.19.10/net/netfilter/
Dxt_cgroup.c39 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()
/linux-5.19.10/block/
Dblk-cgroup-fc-appid.c13 struct cgroup *cgrp; in blkcg_set_fc_appid() local
21 cgrp = cgroup_get_from_id(cgrp_id); in blkcg_set_fc_appid()
22 if (!cgrp) in blkcg_set_fc_appid()
24 css = cgroup_get_e_css(cgrp, &io_cgrp_subsys); in blkcg_set_fc_appid()
40 cgroup_put(cgrp); in blkcg_set_fc_appid()
/linux-5.19.10/drivers/gpu/drm/nouveau/nvkm/engine/fifo/
Dgpfifogk104.c44 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 …]
Dgk110.c33 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,
Dgk104.c172 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 …]
Dgv100.c46 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,
Dgpfifogv100.c158 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_()
Dtu102.c55 .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-5.19.10/tools/testing/selftests/bpf/progs/
Dbtf_type_tag_percpu.c46 int BPF_PROG(test_percpu_load, struct cgroup *cgrp, const char *path) in BPF_PROG() argument
48 g = (__u64)cgrp->rstat_cpu->updated_children; in BPF_PROG()
53 int BPF_PROG(test_percpu_helper, struct cgroup *cgrp, const char *path) in BPF_PROG() argument
59 rstat = (struct cgroup_rstat_cpu *)bpf_per_cpu_ptr(cgrp->rstat_cpu, cpu); in BPF_PROG()
/linux-5.19.10/tools/perf/util/bpf_skel/
Dbperf_cgroup.bpf.c55 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()
Doff_cpu.bpf.c116 struct cgroup *cgrp; in get_cgroup_id() local
119 cgrp = BPF_CORE_READ(t, cgroups, subsys[perf_event_cgrp_id], cgroup); in get_cgroup_id()
121 cgrp = BPF_CORE_READ(t, cgroups, dfl_cgrp); in get_cgroup_id()
123 return BPF_CORE_READ(cgrp, kn, id); in get_cgroup_id()

123