cgroup.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  1. #ifndef _LINUX_CGROUP_H
  2. #define _LINUX_CGROUP_H
  3. /*
  4. * cgroup interface
  5. *
  6. * Copyright (C) 2003 BULL SA
  7. * Copyright (C) 2004-2006 Silicon Graphics, Inc.
  8. *
  9. */
  10. #include <linux/sched.h>
  11. #include <linux/cpumask.h>
  12. #include <linux/nodemask.h>
  13. #include <linux/rculist.h>
  14. #include <linux/cgroupstats.h>
  15. #include <linux/fs.h>
  16. #include <linux/seq_file.h>
  17. #include <linux/kernfs.h>
  18. #include <linux/jump_label.h>
  19. #include <linux/cgroup-defs.h>
  20. #ifdef CONFIG_CGROUPS
  21. /*
  22. * All weight knobs on the default hierarhcy should use the following min,
  23. * default and max values. The default value is the logarithmic center of
  24. * MIN and MAX and allows 100x to be expressed in both directions.
  25. */
  26. #define CGROUP_WEIGHT_MIN 1
  27. #define CGROUP_WEIGHT_DFL 100
  28. #define CGROUP_WEIGHT_MAX 10000
  29. /* a css_task_iter should be treated as an opaque object */
  30. struct css_task_iter {
  31. struct cgroup_subsys *ss;
  32. struct list_head *cset_pos;
  33. struct list_head *cset_head;
  34. struct list_head *task_pos;
  35. struct list_head *tasks_head;
  36. struct list_head *mg_tasks_head;
  37. struct css_set *cur_cset;
  38. struct task_struct *cur_task;
  39. struct list_head iters_node; /* css_set->task_iters */
  40. };
  41. extern struct cgroup_root cgrp_dfl_root;
  42. extern struct css_set init_css_set;
  43. #define SUBSYS(_x) extern struct cgroup_subsys _x ## _cgrp_subsys;
  44. #include <linux/cgroup_subsys.h>
  45. #undef SUBSYS
  46. #define SUBSYS(_x) \
  47. extern struct static_key_true _x ## _cgrp_subsys_enabled_key; \
  48. extern struct static_key_true _x ## _cgrp_subsys_on_dfl_key;
  49. #include <linux/cgroup_subsys.h>
  50. #undef SUBSYS
  51. /**
  52. * cgroup_subsys_enabled - fast test on whether a subsys is enabled
  53. * @ss: subsystem in question
  54. */
  55. #define cgroup_subsys_enabled(ss) \
  56. static_branch_likely(&ss ## _enabled_key)
  57. /**
  58. * cgroup_subsys_on_dfl - fast test on whether a subsys is on default hierarchy
  59. * @ss: subsystem in question
  60. */
  61. #define cgroup_subsys_on_dfl(ss) \
  62. static_branch_likely(&ss ## _on_dfl_key)
  63. bool css_has_online_children(struct cgroup_subsys_state *css);
  64. struct cgroup_subsys_state *css_from_id(int id, struct cgroup_subsys *ss);
  65. struct cgroup_subsys_state *cgroup_get_e_css(struct cgroup *cgroup,
  66. struct cgroup_subsys *ss);
  67. struct cgroup_subsys_state *css_tryget_online_from_dir(struct dentry *dentry,
  68. struct cgroup_subsys *ss);
  69. bool cgroup_is_descendant(struct cgroup *cgrp, struct cgroup *ancestor);
  70. int cgroup_attach_task_all(struct task_struct *from, struct task_struct *);
  71. int cgroup_transfer_tasks(struct cgroup *to, struct cgroup *from);
  72. int cgroup_add_dfl_cftypes(struct cgroup_subsys *ss, struct cftype *cfts);
  73. int cgroup_add_legacy_cftypes(struct cgroup_subsys *ss, struct cftype *cfts);
  74. int cgroup_rm_cftypes(struct cftype *cfts);
  75. void cgroup_file_notify(struct cgroup_file *cfile);
  76. char *task_cgroup_path(struct task_struct *task, char *buf, size_t buflen);
  77. int cgroupstats_build(struct cgroupstats *stats, struct dentry *dentry);
  78. int proc_cgroup_show(struct seq_file *m, struct pid_namespace *ns,
  79. struct pid *pid, struct task_struct *tsk);
  80. void cgroup_fork(struct task_struct *p);
  81. extern int cgroup_can_fork(struct task_struct *p,
  82. void *ss_priv[CGROUP_CANFORK_COUNT]);
  83. extern void cgroup_cancel_fork(struct task_struct *p,
  84. void *ss_priv[CGROUP_CANFORK_COUNT]);
  85. extern void cgroup_post_fork(struct task_struct *p,
  86. void *old_ss_priv[CGROUP_CANFORK_COUNT]);
  87. void cgroup_exit(struct task_struct *p);
  88. void cgroup_free(struct task_struct *p);
  89. int cgroup_init_early(void);
  90. int cgroup_init(void);
  91. /*
  92. * Iteration helpers and macros.
  93. */
  94. struct cgroup_subsys_state *css_next_child(struct cgroup_subsys_state *pos,
  95. struct cgroup_subsys_state *parent);
  96. struct cgroup_subsys_state *css_next_descendant_pre(struct cgroup_subsys_state *pos,
  97. struct cgroup_subsys_state *css);
  98. struct cgroup_subsys_state *css_rightmost_descendant(struct cgroup_subsys_state *pos);
  99. struct cgroup_subsys_state *css_next_descendant_post(struct cgroup_subsys_state *pos,
  100. struct cgroup_subsys_state *css);
  101. struct task_struct *cgroup_taskset_first(struct cgroup_taskset *tset,
  102. struct cgroup_subsys_state **dst_cssp);
  103. struct task_struct *cgroup_taskset_next(struct cgroup_taskset *tset,
  104. struct cgroup_subsys_state **dst_cssp);
  105. void css_task_iter_start(struct cgroup_subsys_state *css,
  106. struct css_task_iter *it);
  107. struct task_struct *css_task_iter_next(struct css_task_iter *it);
  108. void css_task_iter_end(struct css_task_iter *it);
  109. /**
  110. * css_for_each_child - iterate through children of a css
  111. * @pos: the css * to use as the loop cursor
  112. * @parent: css whose children to walk
  113. *
  114. * Walk @parent's children. Must be called under rcu_read_lock().
  115. *
  116. * If a subsystem synchronizes ->css_online() and the start of iteration, a
  117. * css which finished ->css_online() is guaranteed to be visible in the
  118. * future iterations and will stay visible until the last reference is put.
  119. * A css which hasn't finished ->css_online() or already finished
  120. * ->css_offline() may show up during traversal. It's each subsystem's
  121. * responsibility to synchronize against on/offlining.
  122. *
  123. * It is allowed to temporarily drop RCU read lock during iteration. The
  124. * caller is responsible for ensuring that @pos remains accessible until
  125. * the start of the next iteration by, for example, bumping the css refcnt.
  126. */
  127. #define css_for_each_child(pos, parent) \
  128. for ((pos) = css_next_child(NULL, (parent)); (pos); \
  129. (pos) = css_next_child((pos), (parent)))
  130. /**
  131. * css_for_each_descendant_pre - pre-order walk of a css's descendants
  132. * @pos: the css * to use as the loop cursor
  133. * @root: css whose descendants to walk
  134. *
  135. * Walk @root's descendants. @root is included in the iteration and the
  136. * first node to be visited. Must be called under rcu_read_lock().
  137. *
  138. * If a subsystem synchronizes ->css_online() and the start of iteration, a
  139. * css which finished ->css_online() is guaranteed to be visible in the
  140. * future iterations and will stay visible until the last reference is put.
  141. * A css which hasn't finished ->css_online() or already finished
  142. * ->css_offline() may show up during traversal. It's each subsystem's
  143. * responsibility to synchronize against on/offlining.
  144. *
  145. * For example, the following guarantees that a descendant can't escape
  146. * state updates of its ancestors.
  147. *
  148. * my_online(@css)
  149. * {
  150. * Lock @css's parent and @css;
  151. * Inherit state from the parent;
  152. * Unlock both.
  153. * }
  154. *
  155. * my_update_state(@css)
  156. * {
  157. * css_for_each_descendant_pre(@pos, @css) {
  158. * Lock @pos;
  159. * if (@pos == @css)
  160. * Update @css's state;
  161. * else
  162. * Verify @pos is alive and inherit state from its parent;
  163. * Unlock @pos;
  164. * }
  165. * }
  166. *
  167. * As long as the inheriting step, including checking the parent state, is
  168. * enclosed inside @pos locking, double-locking the parent isn't necessary
  169. * while inheriting. The state update to the parent is guaranteed to be
  170. * visible by walking order and, as long as inheriting operations to the
  171. * same @pos are atomic to each other, multiple updates racing each other
  172. * still result in the correct state. It's guaranateed that at least one
  173. * inheritance happens for any css after the latest update to its parent.
  174. *
  175. * If checking parent's state requires locking the parent, each inheriting
  176. * iteration should lock and unlock both @pos->parent and @pos.
  177. *
  178. * Alternatively, a subsystem may choose to use a single global lock to
  179. * synchronize ->css_online() and ->css_offline() against tree-walking
  180. * operations.
  181. *
  182. * It is allowed to temporarily drop RCU read lock during iteration. The
  183. * caller is responsible for ensuring that @pos remains accessible until
  184. * the start of the next iteration by, for example, bumping the css refcnt.
  185. */
  186. #define css_for_each_descendant_pre(pos, css) \
  187. for ((pos) = css_next_descendant_pre(NULL, (css)); (pos); \
  188. (pos) = css_next_descendant_pre((pos), (css)))
  189. /**
  190. * css_for_each_descendant_post - post-order walk of a css's descendants
  191. * @pos: the css * to use as the loop cursor
  192. * @css: css whose descendants to walk
  193. *
  194. * Similar to css_for_each_descendant_pre() but performs post-order
  195. * traversal instead. @root is included in the iteration and the last
  196. * node to be visited.
  197. *
  198. * If a subsystem synchronizes ->css_online() and the start of iteration, a
  199. * css which finished ->css_online() is guaranteed to be visible in the
  200. * future iterations and will stay visible until the last reference is put.
  201. * A css which hasn't finished ->css_online() or already finished
  202. * ->css_offline() may show up during traversal. It's each subsystem's
  203. * responsibility to synchronize against on/offlining.
  204. *
  205. * Note that the walk visibility guarantee example described in pre-order
  206. * walk doesn't apply the same to post-order walks.
  207. */
  208. #define css_for_each_descendant_post(pos, css) \
  209. for ((pos) = css_next_descendant_post(NULL, (css)); (pos); \
  210. (pos) = css_next_descendant_post((pos), (css)))
  211. /**
  212. * cgroup_taskset_for_each - iterate cgroup_taskset
  213. * @task: the loop cursor
  214. * @dst_css: the destination css
  215. * @tset: taskset to iterate
  216. *
  217. * @tset may contain multiple tasks and they may belong to multiple
  218. * processes.
  219. *
  220. * On the v2 hierarchy, there may be tasks from multiple processes and they
  221. * may not share the source or destination csses.
  222. *
  223. * On traditional hierarchies, when there are multiple tasks in @tset, if a
  224. * task of a process is in @tset, all tasks of the process are in @tset.
  225. * Also, all are guaranteed to share the same source and destination csses.
  226. *
  227. * Iteration is not in any specific order.
  228. */
  229. #define cgroup_taskset_for_each(task, dst_css, tset) \
  230. for ((task) = cgroup_taskset_first((tset), &(dst_css)); \
  231. (task); \
  232. (task) = cgroup_taskset_next((tset), &(dst_css)))
  233. /**
  234. * cgroup_taskset_for_each_leader - iterate group leaders in a cgroup_taskset
  235. * @leader: the loop cursor
  236. * @dst_css: the destination css
  237. * @tset: takset to iterate
  238. *
  239. * Iterate threadgroup leaders of @tset. For single-task migrations, @tset
  240. * may not contain any.
  241. */
  242. #define cgroup_taskset_for_each_leader(leader, dst_css, tset) \
  243. for ((leader) = cgroup_taskset_first((tset), &(dst_css)); \
  244. (leader); \
  245. (leader) = cgroup_taskset_next((tset), &(dst_css))) \
  246. if ((leader) != (leader)->group_leader) \
  247. ; \
  248. else
  249. /*
  250. * Inline functions.
  251. */
  252. /**
  253. * css_get - obtain a reference on the specified css
  254. * @css: target css
  255. *
  256. * The caller must already have a reference.
  257. */
  258. static inline void css_get(struct cgroup_subsys_state *css)
  259. {
  260. if (!(css->flags & CSS_NO_REF))
  261. percpu_ref_get(&css->refcnt);
  262. }
  263. /**
  264. * css_get_many - obtain references on the specified css
  265. * @css: target css
  266. * @n: number of references to get
  267. *
  268. * The caller must already have a reference.
  269. */
  270. static inline void css_get_many(struct cgroup_subsys_state *css, unsigned int n)
  271. {
  272. if (!(css->flags & CSS_NO_REF))
  273. percpu_ref_get_many(&css->refcnt, n);
  274. }
  275. /**
  276. * css_tryget - try to obtain a reference on the specified css
  277. * @css: target css
  278. *
  279. * Obtain a reference on @css unless it already has reached zero and is
  280. * being released. This function doesn't care whether @css is on or
  281. * offline. The caller naturally needs to ensure that @css is accessible
  282. * but doesn't have to be holding a reference on it - IOW, RCU protected
  283. * access is good enough for this function. Returns %true if a reference
  284. * count was successfully obtained; %false otherwise.
  285. */
  286. static inline bool css_tryget(struct cgroup_subsys_state *css)
  287. {
  288. if (!(css->flags & CSS_NO_REF))
  289. return percpu_ref_tryget(&css->refcnt);
  290. return true;
  291. }
  292. /**
  293. * css_tryget_online - try to obtain a reference on the specified css if online
  294. * @css: target css
  295. *
  296. * Obtain a reference on @css if it's online. The caller naturally needs
  297. * to ensure that @css is accessible but doesn't have to be holding a
  298. * reference on it - IOW, RCU protected access is good enough for this
  299. * function. Returns %true if a reference count was successfully obtained;
  300. * %false otherwise.
  301. */
  302. static inline bool css_tryget_online(struct cgroup_subsys_state *css)
  303. {
  304. if (!(css->flags & CSS_NO_REF))
  305. return percpu_ref_tryget_live(&css->refcnt);
  306. return true;
  307. }
  308. /**
  309. * css_is_dying - test whether the specified css is dying
  310. * @css: target css
  311. *
  312. * Test whether @css is in the process of offlining or already offline. In
  313. * most cases, ->css_online() and ->css_offline() callbacks should be
  314. * enough; however, the actual offline operations are RCU delayed and this
  315. * test returns %true also when @css is scheduled to be offlined.
  316. *
  317. * This is useful, for example, when the use case requires synchronous
  318. * behavior with respect to cgroup removal. cgroup removal schedules css
  319. * offlining but the css can seem alive while the operation is being
  320. * delayed. If the delay affects user visible semantics, this test can be
  321. * used to resolve the situation.
  322. */
  323. static inline bool css_is_dying(struct cgroup_subsys_state *css)
  324. {
  325. return !(css->flags & CSS_NO_REF) && percpu_ref_is_dying(&css->refcnt);
  326. }
  327. /**
  328. * css_put - put a css reference
  329. * @css: target css
  330. *
  331. * Put a reference obtained via css_get() and css_tryget_online().
  332. */
  333. static inline void css_put(struct cgroup_subsys_state *css)
  334. {
  335. if (!(css->flags & CSS_NO_REF))
  336. percpu_ref_put(&css->refcnt);
  337. }
  338. /**
  339. * css_put_many - put css references
  340. * @css: target css
  341. * @n: number of references to put
  342. *
  343. * Put references obtained via css_get() and css_tryget_online().
  344. */
  345. static inline void css_put_many(struct cgroup_subsys_state *css, unsigned int n)
  346. {
  347. if (!(css->flags & CSS_NO_REF))
  348. percpu_ref_put_many(&css->refcnt, n);
  349. }
  350. /**
  351. * task_css_set_check - obtain a task's css_set with extra access conditions
  352. * @task: the task to obtain css_set for
  353. * @__c: extra condition expression to be passed to rcu_dereference_check()
  354. *
  355. * A task's css_set is RCU protected, initialized and exited while holding
  356. * task_lock(), and can only be modified while holding both cgroup_mutex
  357. * and task_lock() while the task is alive. This macro verifies that the
  358. * caller is inside proper critical section and returns @task's css_set.
  359. *
  360. * The caller can also specify additional allowed conditions via @__c, such
  361. * as locks used during the cgroup_subsys::attach() methods.
  362. */
  363. #ifdef CONFIG_PROVE_RCU
  364. extern struct mutex cgroup_mutex;
  365. extern spinlock_t css_set_lock;
  366. #define task_css_set_check(task, __c) \
  367. rcu_dereference_check((task)->cgroups, \
  368. lockdep_is_held(&cgroup_mutex) || \
  369. lockdep_is_held(&css_set_lock) || \
  370. ((task)->flags & PF_EXITING) || (__c))
  371. #else
  372. #define task_css_set_check(task, __c) \
  373. rcu_dereference((task)->cgroups)
  374. #endif
  375. /**
  376. * task_css_check - obtain css for (task, subsys) w/ extra access conds
  377. * @task: the target task
  378. * @subsys_id: the target subsystem ID
  379. * @__c: extra condition expression to be passed to rcu_dereference_check()
  380. *
  381. * Return the cgroup_subsys_state for the (@task, @subsys_id) pair. The
  382. * synchronization rules are the same as task_css_set_check().
  383. */
  384. #define task_css_check(task, subsys_id, __c) \
  385. task_css_set_check((task), (__c))->subsys[(subsys_id)]
  386. /**
  387. * task_css_set - obtain a task's css_set
  388. * @task: the task to obtain css_set for
  389. *
  390. * See task_css_set_check().
  391. */
  392. static inline struct css_set *task_css_set(struct task_struct *task)
  393. {
  394. return task_css_set_check(task, false);
  395. }
  396. /**
  397. * task_css - obtain css for (task, subsys)
  398. * @task: the target task
  399. * @subsys_id: the target subsystem ID
  400. *
  401. * See task_css_check().
  402. */
  403. static inline struct cgroup_subsys_state *task_css(struct task_struct *task,
  404. int subsys_id)
  405. {
  406. return task_css_check(task, subsys_id, false);
  407. }
  408. /**
  409. * task_get_css - find and get the css for (task, subsys)
  410. * @task: the target task
  411. * @subsys_id: the target subsystem ID
  412. *
  413. * Find the css for the (@task, @subsys_id) combination, increment a
  414. * reference on and return it. This function is guaranteed to return a
  415. * valid css.
  416. */
  417. static inline struct cgroup_subsys_state *
  418. task_get_css(struct task_struct *task, int subsys_id)
  419. {
  420. struct cgroup_subsys_state *css;
  421. rcu_read_lock();
  422. while (true) {
  423. css = task_css(task, subsys_id);
  424. if (likely(css_tryget_online(css)))
  425. break;
  426. cpu_relax();
  427. }
  428. rcu_read_unlock();
  429. return css;
  430. }
  431. /**
  432. * task_css_is_root - test whether a task belongs to the root css
  433. * @task: the target task
  434. * @subsys_id: the target subsystem ID
  435. *
  436. * Test whether @task belongs to the root css on the specified subsystem.
  437. * May be invoked in any context.
  438. */
  439. static inline bool task_css_is_root(struct task_struct *task, int subsys_id)
  440. {
  441. return task_css_check(task, subsys_id, true) ==
  442. init_css_set.subsys[subsys_id];
  443. }
  444. static inline struct cgroup *task_cgroup(struct task_struct *task,
  445. int subsys_id)
  446. {
  447. return task_css(task, subsys_id)->cgroup;
  448. }
  449. /* no synchronization, the result can only be used as a hint */
  450. static inline bool cgroup_is_populated(struct cgroup *cgrp)
  451. {
  452. return cgrp->populated_cnt;
  453. }
  454. /* returns ino associated with a cgroup */
  455. static inline ino_t cgroup_ino(struct cgroup *cgrp)
  456. {
  457. return cgrp->kn->ino;
  458. }
  459. /* cft/css accessors for cftype->write() operation */
  460. static inline struct cftype *of_cft(struct kernfs_open_file *of)
  461. {
  462. return of->kn->priv;
  463. }
  464. struct cgroup_subsys_state *of_css(struct kernfs_open_file *of);
  465. /* cft/css accessors for cftype->seq_*() operations */
  466. static inline struct cftype *seq_cft(struct seq_file *seq)
  467. {
  468. return of_cft(seq->private);
  469. }
  470. static inline struct cgroup_subsys_state *seq_css(struct seq_file *seq)
  471. {
  472. return of_css(seq->private);
  473. }
  474. /*
  475. * Name / path handling functions. All are thin wrappers around the kernfs
  476. * counterparts and can be called under any context.
  477. */
  478. static inline int cgroup_name(struct cgroup *cgrp, char *buf, size_t buflen)
  479. {
  480. return kernfs_name(cgrp->kn, buf, buflen);
  481. }
  482. static inline char * __must_check cgroup_path(struct cgroup *cgrp, char *buf,
  483. size_t buflen)
  484. {
  485. return kernfs_path(cgrp->kn, buf, buflen);
  486. }
  487. static inline void pr_cont_cgroup_name(struct cgroup *cgrp)
  488. {
  489. pr_cont_kernfs_name(cgrp->kn);
  490. }
  491. static inline void pr_cont_cgroup_path(struct cgroup *cgrp)
  492. {
  493. pr_cont_kernfs_path(cgrp->kn);
  494. }
  495. static inline void cgroup_init_kthreadd(void)
  496. {
  497. /*
  498. * kthreadd is inherited by all kthreads, keep it in the root so
  499. * that the new kthreads are guaranteed to stay in the root until
  500. * initialization is finished.
  501. */
  502. current->no_cgroup_migration = 1;
  503. }
  504. static inline void cgroup_kthread_ready(void)
  505. {
  506. /*
  507. * This kthread finished initialization. The creator should have
  508. * set PF_NO_SETAFFINITY if this kthread should stay in the root.
  509. */
  510. current->no_cgroup_migration = 0;
  511. }
  512. #else /* !CONFIG_CGROUPS */
  513. struct cgroup_subsys_state;
  514. static inline void css_put(struct cgroup_subsys_state *css) {}
  515. static inline int cgroup_attach_task_all(struct task_struct *from,
  516. struct task_struct *t) { return 0; }
  517. static inline int cgroupstats_build(struct cgroupstats *stats,
  518. struct dentry *dentry) { return -EINVAL; }
  519. static inline void cgroup_fork(struct task_struct *p) {}
  520. static inline int cgroup_can_fork(struct task_struct *p,
  521. void *ss_priv[CGROUP_CANFORK_COUNT])
  522. { return 0; }
  523. static inline void cgroup_cancel_fork(struct task_struct *p,
  524. void *ss_priv[CGROUP_CANFORK_COUNT]) {}
  525. static inline void cgroup_post_fork(struct task_struct *p,
  526. void *ss_priv[CGROUP_CANFORK_COUNT]) {}
  527. static inline void cgroup_exit(struct task_struct *p) {}
  528. static inline void cgroup_free(struct task_struct *p) {}
  529. static inline int cgroup_init_early(void) { return 0; }
  530. static inline int cgroup_init(void) { return 0; }
  531. static inline void cgroup_init_kthreadd(void) {}
  532. static inline void cgroup_kthread_ready(void) {}
  533. #endif /* !CONFIG_CGROUPS */
  534. #endif /* _LINUX_CGROUP_H */