Home
last modified time | relevance | path

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

12

/Linux-v4.19/kernel/cgroup/
Drstat.c8 static void cgroup_base_stat_flush(struct cgroup *cgrp, int cpu);
10 static struct cgroup_rstat_cpu *cgroup_rstat_cpu(struct cgroup *cgrp, int cpu) in cgroup_rstat_cpu() argument
12 return per_cpu_ptr(cgrp->rstat_cpu, cpu); in cgroup_rstat_cpu()
24 void cgroup_rstat_updated(struct cgroup *cgrp, int cpu) in cgroup_rstat_updated() argument
31 if (!cgroup_parent(cgrp)) in cgroup_rstat_updated()
45 if (cgroup_rstat_cpu(cgrp, cpu)->updated_next) in cgroup_rstat_updated()
51 for (parent = cgroup_parent(cgrp); parent; in cgroup_rstat_updated()
52 cgrp = parent, parent = cgroup_parent(cgrp)) { in cgroup_rstat_updated()
53 struct cgroup_rstat_cpu *rstatc = cgroup_rstat_cpu(cgrp, cpu); in cgroup_rstat_updated()
64 prstatc->updated_children = cgrp; in cgroup_rstat_updated()
[all …]
Dcgroup.c158 struct cgroup_root cgrp_dfl_root = { .cgrp.rstat_cpu = &cgrp_dfl_root_rstat_cpu };
213 static int cgroup_apply_control(struct cgroup *cgrp);
214 static void cgroup_finalize_control(struct cgroup *cgrp, int ret);
216 static int cgroup_destroy_locked(struct cgroup *cgrp);
217 static struct cgroup_subsys_state *css_create(struct cgroup *cgrp,
222 struct cgroup *cgrp, struct cftype cfts[],
294 bool cgroup_on_dfl(const struct cgroup *cgrp) in cgroup_on_dfl() argument
296 return cgrp->root == &cgrp_dfl_root; in cgroup_on_dfl()
330 static bool cgroup_has_tasks(struct cgroup *cgrp) in cgroup_has_tasks() argument
332 return cgrp->nr_populated_csets; in cgroup_has_tasks()
[all …]
Dcgroup-internal.h25 #define TRACE_CGROUP_PATH(type, cgrp, ...) \ argument
29 cgroup_path(cgrp, trace_cgroup_path, \
31 trace_cgroup_##type(cgrp, trace_cgroup_path, \
47 struct cgroup *cgrp; member
147 static inline bool cgroup_is_dead(const struct cgroup *cgrp) in cgroup_is_dead() argument
149 return !(cgrp->self.flags & CSS_ONLINE); in cgroup_is_dead()
152 static inline bool notify_on_release(const struct cgroup *cgrp) in notify_on_release() argument
154 return test_bit(CGRP_NOTIFY_ON_RELEASE, &cgrp->flags); in notify_on_release()
185 bool cgroup_on_dfl(const struct cgroup *cgrp);
186 bool cgroup_is_thread_root(struct cgroup *cgrp);
[all …]
Dcgroup-v1.c212 void cgroup1_pidlist_destroy_all(struct cgroup *cgrp) in cgroup1_pidlist_destroy_all() argument
216 mutex_lock(&cgrp->pidlist_mutex); in cgroup1_pidlist_destroy_all()
217 list_for_each_entry_safe(l, tmp_l, &cgrp->pidlists, links) in cgroup1_pidlist_destroy_all()
219 mutex_unlock(&cgrp->pidlist_mutex); in cgroup1_pidlist_destroy_all()
222 BUG_ON(!list_empty(&cgrp->pidlists)); in cgroup1_pidlist_destroy_all()
293 static struct cgroup_pidlist *cgroup_pidlist_find(struct cgroup *cgrp, in cgroup_pidlist_find() argument
300 lockdep_assert_held(&cgrp->pidlist_mutex); in cgroup_pidlist_find()
302 list_for_each_entry(l, &cgrp->pidlists, links) in cgroup_pidlist_find()
314 static struct cgroup_pidlist *cgroup_pidlist_find_create(struct cgroup *cgrp, in cgroup_pidlist_find_create() argument
319 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-v4.19/kernel/bpf/
Dcgroup.c26 void cgroup_bpf_put(struct cgroup *cgrp) in cgroup_bpf_put() argument
30 for (type = 0; type < ARRAY_SIZE(cgrp->bpf.progs); type++) { in cgroup_bpf_put()
31 struct list_head *progs = &cgrp->bpf.progs[type]; in cgroup_bpf_put()
42 bpf_prog_array_free(cgrp->bpf.effective[type]); in cgroup_bpf_put()
66 static bool hierarchy_allows_attach(struct cgroup *cgrp, in hierarchy_allows_attach() argument
72 p = cgroup_parent(cgrp); in hierarchy_allows_attach()
96 static int compute_effective_progs(struct cgroup *cgrp, in compute_effective_progs() argument
102 struct cgroup *p = cgrp; in compute_effective_progs()
118 p = cgrp; in compute_effective_progs()
137 static void activate_effective_progs(struct cgroup *cgrp, in activate_effective_progs() argument
[all …]
Dhelpers.c186 struct cgroup *cgrp = task_dfl_cgroup(current); in BPF_CALL_0() local
188 return cgrp->kn->id.id; in BPF_CALL_0()
/Linux-v4.19/include/linux/
Dcgroup.h403 static inline void cgroup_get(struct cgroup *cgrp) in cgroup_get() argument
405 css_get(&cgrp->self); in cgroup_get()
408 static inline bool cgroup_tryget(struct cgroup *cgrp) in cgroup_tryget() argument
410 return css_tryget(&cgrp->self); in cgroup_tryget()
413 static inline void cgroup_put(struct cgroup *cgrp) in cgroup_put() argument
415 css_put(&cgrp->self); in cgroup_put()
530 static inline struct cgroup *cgroup_parent(struct cgroup *cgrp) in cgroup_parent() argument
532 struct cgroup_subsys_state *parent_css = cgrp->self.parent; in cgroup_parent()
548 static inline bool cgroup_is_descendant(struct cgroup *cgrp, in cgroup_is_descendant() argument
551 if (cgrp->root != ancestor->root || cgrp->level < ancestor->level) in cgroup_is_descendant()
[all …]
Dbpf-cgroup.h67 void cgroup_bpf_put(struct cgroup *cgrp);
68 int cgroup_bpf_inherit(struct cgroup *cgrp);
70 int __cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog,
72 int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
74 int __cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr,
78 int cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog,
80 int cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
82 int cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr,
246 static inline void cgroup_bpf_put(struct cgroup *cgrp) {} in cgroup_bpf_put() argument
247 static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; } in cgroup_bpf_inherit() argument
/Linux-v4.19/tools/perf/util/
Dcgroup.c100 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()
143 struct cgroup *cgrp = evlist__findnew_cgroup(evlist, str); in add_cgroup() local
146 if (!cgrp) in add_cgroup()
159 cgroup__put(cgrp); in add_cgroup()
162 counter->cgrp = cgrp; in add_cgroup()
173 void cgroup__put(struct cgroup *cgrp) in cgroup__put() argument
175 if (cgrp && refcount_dec_and_test(&cgrp->refcnt)) { in cgroup__put()
176 cgroup__delete(cgrp); in cgroup__put()
[all …]
/Linux-v4.19/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 = cgrp->id;
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-v4.19/tools/testing/selftests/bpf/
Dtest_sockmap.c915 static int __test_exec(int cgrp, int test, struct sockmap_options *opt) in __test_exec() argument
937 err = run_options(opt, cgrp, test); in __test_exec()
945 static int test_exec(int cgrp, struct sockmap_options *opt) in test_exec() argument
947 int err = __test_exec(cgrp, SENDMSG, opt); in test_exec()
952 err = __test_exec(cgrp, SENDPAGE, opt); in test_exec()
957 static int test_loop(int cgrp) in test_loop() argument
978 err = test_exec(cgrp, &opt); in test_loop()
988 static int test_txmsg(int cgrp) in test_txmsg() argument
997 err = test_loop(cgrp); in test_txmsg()
1003 err = test_loop(cgrp); in test_txmsg()
[all …]
/Linux-v4.19/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()
225 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,
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,
Dgk104.c159 struct nvkm_fifo_cgrp *cgrp; in gk104_fifo_runlist_commit() local
172 list_for_each_entry(cgrp, &fifo->runlist[runl].cgrp, head) { in gk104_fifo_runlist_commit()
173 func->cgrp(cgrp, mem, nr++ * func->size); in gk104_fifo_runlist_commit()
174 list_for_each_entry(chan, &cgrp->chan, head) { in gk104_fifo_runlist_commit()
204 struct nvkm_fifo_cgrp *cgrp = chan->cgrp; in gk104_fifo_runlist_remove() local
208 if (cgrp && !--cgrp->chan_nr) in gk104_fifo_runlist_remove()
209 list_del_init(&cgrp->head); in gk104_fifo_runlist_remove()
217 struct nvkm_fifo_cgrp *cgrp = chan->cgrp; in gk104_fifo_runlist_insert() local
219 if (cgrp) { in gk104_fifo_runlist_insert()
220 if (!cgrp->chan_nr++) in gk104_fifo_runlist_insert()
[all …]
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_()
Dgk104.h35 struct list_head cgrp; member
60 void (*cgrp)(struct nvkm_fifo_cgrp *, member
Dchangk104.h13 struct nvkm_fifo_cgrp *cgrp; member
Dgm107.c42 .cgrp = gk110_fifo_runlist_cgrp,
/Linux-v4.19/net/netfilter/
Dxt_cgroup.c42 struct cgroup *cgrp; in cgroup_mt_check_v1() local
59 cgrp = cgroup_get_from_path(info->path); in cgroup_mt_check_v1()
60 if (IS_ERR(cgrp)) { in cgroup_mt_check_v1()
62 PTR_ERR(cgrp)); in cgroup_mt_check_v1()
65 info->priv = cgrp; in cgroup_mt_check_v1()
/Linux-v4.19/Documentation/cgroup-v1/
Dcgroups.txt532 struct cgroup_subsys_state *css_alloc(struct cgroup *cgrp)
547 int css_online(struct cgroup *cgrp)
550 Called after @cgrp successfully completed all allocations and made
557 void css_offline(struct cgroup *cgrp);
561 has succeeded on @cgrp. This signifies the beginning of the end of
562 @cgrp. @cgrp is being removed and the subsystem should start dropping
563 all references it's holding on @cgrp. When all references are dropped,
565 callback, @cgrp should be considered dead to the subsystem.
567 void css_free(struct cgroup *cgrp)
570 The cgroup system is about to free @cgrp; the subsystem should free
[all …]
/Linux-v4.19/kernel/events/
Dcore.c676 if (!event->cgrp) in perf_cgroup_match()
680 if (!cpuctx->cgrp) in perf_cgroup_match()
689 return cgroup_is_descendant(cpuctx->cgrp->css.cgroup, in perf_cgroup_match()
690 event->cgrp->css.cgroup); in perf_cgroup_match()
695 css_put(&event->cgrp->css); in perf_detach_cgroup()
696 event->cgrp = NULL; in perf_detach_cgroup()
701 return event->cgrp != NULL; in is_cgroup_event()
708 t = per_cpu_ptr(event->cgrp->info, event->cpu); in perf_cgroup_event_time()
712 static inline void __update_cgrp_time(struct perf_cgroup *cgrp) in __update_cgrp_time() argument
719 info = this_cpu_ptr(cgrp->info); in __update_cgrp_time()
[all …]
/Linux-v4.19/kernel/trace/
Dbpf_trace.c474 struct cgroup *cgrp; in BPF_CALL_2() local
479 cgrp = READ_ONCE(array->ptrs[idx]); in BPF_CALL_2()
480 if (unlikely(!cgrp)) in BPF_CALL_2()
483 return task_under_cgroup_hierarchy(current, cgrp); in BPF_CALL_2()
/Linux-v4.19/tools/perf/
Dbuiltin-stat.c1097 if (evsel->cgrp) in abs_printout()
1098 fprintf(output, "%s%s", csv_sep, evsel->cgrp->name); in abs_printout()
1162 if (counter->cgrp) in printout()
1191 if (counter->cgrp) in printout()
1193 csv_sep, counter->cgrp->name); in printout()
1288 alias->cgrp != counter->cgrp || in collect_all_aliases()

12