.. | .. |
---|
89 | 89 | * Enable cpuset controller in v1 cgroup to use v2 behavior. |
---|
90 | 90 | */ |
---|
91 | 91 | CGRP_ROOT_CPUSET_V2_MODE = (1 << 4), |
---|
| 92 | + |
---|
| 93 | + /* |
---|
| 94 | + * Enable legacy local memory.events. |
---|
| 95 | + */ |
---|
| 96 | + CGRP_ROOT_MEMORY_LOCAL_EVENTS = (1 << 5), |
---|
| 97 | + |
---|
| 98 | + /* |
---|
| 99 | + * Enable recursive subtree protection |
---|
| 100 | + */ |
---|
| 101 | + CGRP_ROOT_MEMORY_RECURSIVE_PROT = (1 << 6), |
---|
92 | 102 | }; |
---|
93 | 103 | |
---|
94 | 104 | /* cftype->flags */ |
---|
.. | .. |
---|
99 | 109 | |
---|
100 | 110 | CFTYPE_NO_PREFIX = (1 << 3), /* (DON'T USE FOR NEW FILES) no subsys prefix */ |
---|
101 | 111 | CFTYPE_WORLD_WRITABLE = (1 << 4), /* (DON'T USE FOR NEW FILES) S_IWUGO */ |
---|
| 112 | + CFTYPE_DEBUG = (1 << 5), /* create when cgroup_debug */ |
---|
102 | 113 | CFTYPE_PRESSURE = (1 << 6), /* only if pressure feature is enabled */ |
---|
103 | 114 | |
---|
104 | 115 | /* internal flags, do not use outside cgroup core proper */ |
---|
.. | .. |
---|
271 | 282 | struct rcu_head rcu_head; |
---|
272 | 283 | }; |
---|
273 | 284 | |
---|
| 285 | +struct ext_css_set { |
---|
| 286 | + struct css_set cset; |
---|
| 287 | + |
---|
| 288 | + struct list_head mg_src_preload_node; |
---|
| 289 | + struct list_head mg_dst_preload_node; |
---|
| 290 | +}; |
---|
| 291 | + |
---|
274 | 292 | struct cgroup_base_stat { |
---|
275 | 293 | struct task_cputime cputime; |
---|
276 | 294 | }; |
---|
.. | .. |
---|
348 | 366 | struct cgroup_subsys_state self; |
---|
349 | 367 | |
---|
350 | 368 | unsigned long flags; /* "unsigned long" so bitops work */ |
---|
351 | | - |
---|
352 | | - /* |
---|
353 | | - * idr allocated in-hierarchy ID. |
---|
354 | | - * |
---|
355 | | - * ID 0 is not used, the ID of the root cgroup is always 1, and a |
---|
356 | | - * new cgroup will be assigned with a smallest available ID. |
---|
357 | | - * |
---|
358 | | - * Allocating/Removing ID must be protected by cgroup_mutex. |
---|
359 | | - */ |
---|
360 | | - int id; |
---|
361 | 369 | |
---|
362 | 370 | /* |
---|
363 | 371 | * The depth this cgroup is at. The root is at depth zero and each |
---|
.. | .. |
---|
453 | 461 | struct list_head rstat_css_list; |
---|
454 | 462 | |
---|
455 | 463 | /* cgroup basic resource statistics */ |
---|
456 | | - struct cgroup_base_stat pending_bstat; /* pending from children */ |
---|
| 464 | + struct cgroup_base_stat last_bstat; |
---|
457 | 465 | struct cgroup_base_stat bstat; |
---|
458 | 466 | struct prev_cputime prev_cputime; /* for printing out cputime */ |
---|
459 | 467 | |
---|
.. | .. |
---|
482 | 490 | /* Used to store internal freezer state */ |
---|
483 | 491 | struct cgroup_freezer_state freezer; |
---|
484 | 492 | |
---|
485 | | - ANDROID_KABI_RESERVE(1); |
---|
486 | | - ANDROID_KABI_RESERVE(2); |
---|
487 | | - ANDROID_KABI_RESERVE(3); |
---|
488 | | - |
---|
489 | 493 | /* ids of the ancestors at each level including self */ |
---|
490 | | - int ancestor_ids[]; |
---|
| 494 | + u64 ancestor_ids[]; |
---|
491 | 495 | }; |
---|
492 | 496 | |
---|
493 | 497 | /* |
---|
.. | .. |
---|
508 | 512 | struct cgroup cgrp; |
---|
509 | 513 | |
---|
510 | 514 | /* for cgrp->ancestor_ids[0] */ |
---|
511 | | - int cgrp_ancestor_id_storage; |
---|
| 515 | + u64 cgrp_ancestor_id_storage; |
---|
512 | 516 | |
---|
513 | 517 | /* Number of cgroups in the hierarchy, used only for /proc/cgroups */ |
---|
514 | 518 | atomic_t nr_cgrps; |
---|
.. | .. |
---|
518 | 522 | |
---|
519 | 523 | /* Hierarchy-specific flags */ |
---|
520 | 524 | unsigned int flags; |
---|
521 | | - |
---|
522 | | - /* IDs for cgroups in this hierarchy */ |
---|
523 | | - struct idr cgroup_idr; |
---|
524 | 525 | |
---|
525 | 526 | /* The path to use for release notifications. */ |
---|
526 | 527 | char release_agent_path[PATH_MAX]; |
---|
.. | .. |
---|
623 | 624 | |
---|
624 | 625 | /* |
---|
625 | 626 | * Control Group subsystem type. |
---|
626 | | - * See Documentation/cgroup-v1/cgroups.txt for details |
---|
| 627 | + * See Documentation/admin-guide/cgroup-v1/cgroups.rst for details |
---|
627 | 628 | */ |
---|
628 | 629 | struct cgroup_subsys { |
---|
629 | 630 | struct cgroup_subsys_state *(*css_alloc)(struct cgroup_subsys_state *parent_css); |
---|
.. | .. |
---|
640 | 641 | void (*cancel_attach)(struct cgroup_taskset *tset); |
---|
641 | 642 | void (*attach)(struct cgroup_taskset *tset); |
---|
642 | 643 | void (*post_attach)(void); |
---|
643 | | - int (*can_fork)(struct task_struct *task); |
---|
644 | | - void (*cancel_fork)(struct task_struct *task); |
---|
| 644 | + int (*can_fork)(struct task_struct *task, |
---|
| 645 | + struct css_set *cset); |
---|
| 646 | + void (*cancel_fork)(struct task_struct *task, struct css_set *cset); |
---|
645 | 647 | void (*fork)(struct task_struct *task); |
---|
646 | 648 | void (*exit)(struct task_struct *task); |
---|
647 | 649 | void (*release)(struct task_struct *task); |
---|
.. | .. |
---|
796 | 798 | union { |
---|
797 | 799 | #ifdef __LITTLE_ENDIAN |
---|
798 | 800 | struct { |
---|
799 | | -#ifdef __GENKSYMS__ |
---|
800 | | - u8 is_data; |
---|
801 | | -#else |
---|
802 | 801 | u8 is_data : 1; |
---|
803 | 802 | u8 no_refcnt : 1; |
---|
804 | 803 | u8 unused : 6; |
---|
805 | | -#endif |
---|
806 | 804 | u8 padding; |
---|
807 | 805 | u16 prioidx; |
---|
808 | 806 | u32 classid; |
---|