Lines Matching refs:cgrp
324 static inline u64 cgroup_id(const struct cgroup *cgrp) in cgroup_id() argument
326 return cgrp->kn->id; in cgroup_id()
349 static inline void cgroup_get(struct cgroup *cgrp) in cgroup_get() argument
351 css_get(&cgrp->self); in cgroup_get()
354 static inline bool cgroup_tryget(struct cgroup *cgrp) in cgroup_tryget() argument
356 return css_tryget(&cgrp->self); in cgroup_tryget()
359 static inline void cgroup_put(struct cgroup *cgrp) in cgroup_put() argument
361 css_put(&cgrp->self); in cgroup_put()
493 static inline struct cgroup *cgroup_parent(struct cgroup *cgrp) in cgroup_parent() argument
495 struct cgroup_subsys_state *parent_css = cgrp->self.parent; in cgroup_parent()
511 static inline bool cgroup_is_descendant(struct cgroup *cgrp, in cgroup_is_descendant() argument
514 if (cgrp->root != ancestor->root || cgrp->level < ancestor->level) in cgroup_is_descendant()
516 return cgrp->ancestors[ancestor->level] == ancestor; in cgroup_is_descendant()
530 static inline struct cgroup *cgroup_ancestor(struct cgroup *cgrp, in cgroup_ancestor() argument
533 if (ancestor_level < 0 || ancestor_level > cgrp->level) in cgroup_ancestor()
535 return cgrp->ancestors[ancestor_level]; in cgroup_ancestor()
556 static inline bool cgroup_is_populated(struct cgroup *cgrp) in cgroup_is_populated() argument
558 return cgrp->nr_populated_csets + cgrp->nr_populated_domain_children + in cgroup_is_populated()
559 cgrp->nr_populated_threaded_children; in cgroup_is_populated()
563 static inline ino_t cgroup_ino(struct cgroup *cgrp) in cgroup_ino() argument
565 return kernfs_ino(cgrp->kn); in cgroup_ino()
592 static inline int cgroup_name(struct cgroup *cgrp, char *buf, size_t buflen) in cgroup_name() argument
594 return kernfs_name(cgrp->kn, buf, buflen); in cgroup_name()
597 static inline int cgroup_path(struct cgroup *cgrp, char *buf, size_t buflen) in cgroup_path() argument
599 return kernfs_path(cgrp->kn, buf, buflen); in cgroup_path()
602 static inline void pr_cont_cgroup_name(struct cgroup *cgrp) in pr_cont_cgroup_name() argument
604 pr_cont_kernfs_name(cgrp->kn); in pr_cont_cgroup_name()
607 static inline void pr_cont_cgroup_path(struct cgroup *cgrp) in pr_cont_cgroup_path() argument
609 pr_cont_kernfs_path(cgrp->kn); in pr_cont_cgroup_path()
640 static inline u64 cgroup_id(const struct cgroup *cgrp) { return 1; } in cgroup_id() argument
666 static inline struct cgroup *cgroup_parent(struct cgroup *cgrp) in cgroup_parent() argument
690 void cgroup_rstat_updated(struct cgroup *cgrp, int cpu);
691 void cgroup_rstat_flush(struct cgroup *cgrp);
692 void cgroup_rstat_flush_hold(struct cgroup *cgrp);
693 void cgroup_rstat_flush_release(struct cgroup *cgrp);
707 void __cgroup_account_cputime(struct cgroup *cgrp, u64 delta_exec);
708 void __cgroup_account_cputime_field(struct cgroup *cgrp,
714 struct cgroup *cgrp; in cgroup_account_cputime() local
718 cgrp = task_dfl_cgroup(task); in cgroup_account_cputime()
719 if (cgroup_parent(cgrp)) in cgroup_account_cputime()
720 __cgroup_account_cputime(cgrp, delta_exec); in cgroup_account_cputime()
727 struct cgroup *cgrp; in cgroup_account_cputime_field() local
731 cgrp = task_dfl_cgroup(task); in cgroup_account_cputime_field()
732 if (cgroup_parent(cgrp)) in cgroup_account_cputime_field()
733 __cgroup_account_cputime_field(cgrp, index, delta_exec); in cgroup_account_cputime_field()
786 int cgroup_path_ns(struct cgroup *cgrp, char *buf, size_t buflen,
817 void cgroup_update_frozen(struct cgroup *cgrp);
818 void cgroup_freeze(struct cgroup *cgrp, bool freeze);
839 static inline void cgroup_bpf_get(struct cgroup *cgrp) in cgroup_bpf_get() argument
841 percpu_ref_get(&cgrp->bpf.refcnt); in cgroup_bpf_get()
844 static inline void cgroup_bpf_put(struct cgroup *cgrp) in cgroup_bpf_put() argument
846 percpu_ref_put(&cgrp->bpf.refcnt); in cgroup_bpf_put()
851 static inline void cgroup_bpf_get(struct cgroup *cgrp) {} in cgroup_bpf_get() argument
852 static inline void cgroup_bpf_put(struct cgroup *cgrp) {} in cgroup_bpf_put() argument