• Home
  • Raw
  • Download

Lines Matching refs:cgrp

314 static inline u64 cgroup_id(const struct cgroup *cgrp)  in cgroup_id()  argument
316 return cgrp->kn->id; in cgroup_id()
424 static inline void cgroup_get(struct cgroup *cgrp) in cgroup_get() argument
426 css_get(&cgrp->self); in cgroup_get()
429 static inline bool cgroup_tryget(struct cgroup *cgrp) in cgroup_tryget() argument
431 return css_tryget(&cgrp->self); in cgroup_tryget()
434 static inline void cgroup_put(struct cgroup *cgrp) in cgroup_put() argument
436 css_put(&cgrp->self); in cgroup_put()
569 static inline struct cgroup *cgroup_parent(struct cgroup *cgrp) in cgroup_parent() argument
571 struct cgroup_subsys_state *parent_css = cgrp->self.parent; in cgroup_parent()
587 static inline bool cgroup_is_descendant(struct cgroup *cgrp, in cgroup_is_descendant() argument
590 if (cgrp->root != ancestor->root || cgrp->level < ancestor->level) in cgroup_is_descendant()
592 return cgrp->ancestor_ids[ancestor->level] == cgroup_id(ancestor); in cgroup_is_descendant()
606 static inline struct cgroup *cgroup_ancestor(struct cgroup *cgrp, in cgroup_ancestor() argument
609 if (cgrp->level < ancestor_level) in cgroup_ancestor()
611 while (cgrp && cgrp->level > ancestor_level) in cgroup_ancestor()
612 cgrp = cgroup_parent(cgrp); in cgroup_ancestor()
613 return cgrp; in cgroup_ancestor()
634 static inline bool cgroup_is_populated(struct cgroup *cgrp) in cgroup_is_populated() argument
636 return cgrp->nr_populated_csets + cgrp->nr_populated_domain_children + in cgroup_is_populated()
637 cgrp->nr_populated_threaded_children; in cgroup_is_populated()
641 static inline ino_t cgroup_ino(struct cgroup *cgrp) in cgroup_ino() argument
643 return kernfs_ino(cgrp->kn); in cgroup_ino()
670 static inline int cgroup_name(struct cgroup *cgrp, char *buf, size_t buflen) in cgroup_name() argument
672 return kernfs_name(cgrp->kn, buf, buflen); in cgroup_name()
675 static inline int cgroup_path(struct cgroup *cgrp, char *buf, size_t buflen) in cgroup_path() argument
677 return kernfs_path(cgrp->kn, buf, buflen); in cgroup_path()
680 static inline void pr_cont_cgroup_name(struct cgroup *cgrp) in pr_cont_cgroup_name() argument
682 pr_cont_kernfs_name(cgrp->kn); in pr_cont_cgroup_name()
685 static inline void pr_cont_cgroup_path(struct cgroup *cgrp) in pr_cont_cgroup_path() argument
687 pr_cont_kernfs_path(cgrp->kn); in pr_cont_cgroup_path()
690 static inline struct psi_group *cgroup_psi(struct cgroup *cgrp) in cgroup_psi() argument
692 return &cgrp->psi; in cgroup_psi()
723 static inline u64 cgroup_id(const struct cgroup *cgrp) { return 1; } in cgroup_id() argument
749 static inline struct cgroup *cgroup_parent(struct cgroup *cgrp) in cgroup_parent() argument
754 static inline struct psi_group *cgroup_psi(struct cgroup *cgrp) in cgroup_psi() argument
783 void cgroup_rstat_updated(struct cgroup *cgrp, int cpu);
784 void cgroup_rstat_flush(struct cgroup *cgrp);
785 void cgroup_rstat_flush_irqsafe(struct cgroup *cgrp);
786 void cgroup_rstat_flush_hold(struct cgroup *cgrp);
801 void __cgroup_account_cputime(struct cgroup *cgrp, u64 delta_exec);
802 void __cgroup_account_cputime_field(struct cgroup *cgrp,
808 struct cgroup *cgrp; in cgroup_account_cputime() local
812 cgrp = task_dfl_cgroup(task); in cgroup_account_cputime()
813 if (cgroup_parent(cgrp)) in cgroup_account_cputime()
814 __cgroup_account_cputime(cgrp, delta_exec); in cgroup_account_cputime()
821 struct cgroup *cgrp; in cgroup_account_cputime_field() local
826 cgrp = task_dfl_cgroup(task); in cgroup_account_cputime_field()
827 if (cgroup_parent(cgrp)) in cgroup_account_cputime_field()
828 __cgroup_account_cputime_field(cgrp, index, delta_exec); in cgroup_account_cputime_field()
882 int cgroup_path_ns(struct cgroup *cgrp, char *buf, size_t buflen,
913 void cgroup_update_frozen(struct cgroup *cgrp);
914 void cgroup_freeze(struct cgroup *cgrp, bool freeze);
935 static inline void cgroup_bpf_get(struct cgroup *cgrp) in cgroup_bpf_get() argument
937 percpu_ref_get(&cgrp->bpf.refcnt); in cgroup_bpf_get()
940 static inline void cgroup_bpf_put(struct cgroup *cgrp) in cgroup_bpf_put() argument
942 percpu_ref_put(&cgrp->bpf.refcnt); in cgroup_bpf_put()
947 static inline void cgroup_bpf_get(struct cgroup *cgrp) {} in cgroup_bpf_get() argument
948 static inline void cgroup_bpf_put(struct cgroup *cgrp) {} in cgroup_bpf_put() argument