- Adds methods to Enter, Leave and Migrate the tasks for memory controller.
- Update the memory cgroup id when the task enters and leaves the cgroups.
PiperOrigin-RevId: 555568875
When charging a pids cgroup during thread creation, it is possible for
the hierachy containing the pids controller to be destroyed and
recreated. If thread creation fails and the charge has to be rolled
back, an intervening hierachy change previously caused a charge
underflow during the rollback.
If the hierachy changes between the charge and uncharge, the uncharge
is uncessary.
Reported-by: [email protected]
PiperOrigin-RevId: 471112484
Rename was broken for serveral reasons:
- The underlying kernfs.OrderedChildren.Rename had a bug so it could
never successfully extract OrderedChildren from the dst Inode.
- kernfs.OrderedChildren.Rename didn't check for name collisions on
the dst.
cgroupfs is the first kernfs-based filesystem to implement rename, so
these code paths weren't exercised.
PiperOrigin-RevId: 444964501
The PID controller isn't uncharged synchronously with task exit. The
test checks the PID is released after thread join, which races with
the task being reaped.
PiperOrigin-RevId: 444960688
Previously we were returning the path to the control file used to
migrate a task, rather than the path to the cgroup directory.
PiperOrigin-RevId: 438676422
Also don't print kernfs inode internals on panic, when we can't
acquire the necessary locks.
Reported-by: [email protected]
Reported-by: [email protected]
PiperOrigin-RevId: 436869482
Allow creation and management of subcontainers through cgroupfs
directory syscalls. Also add a mechanism to specify a default root
container to start new jobs in.
This implements the filesystem support for subcontainers, but doesn't
implement hierarchical resource accounting or task migration.
PiperOrigin-RevId: 390254870
Previously, mount could discover a hierarchy being destroyed
concurrently, which resulted in mount attempting to take a ref on an
already destroyed cgroupfs.
Reported-by: [email protected]
PiperOrigin-RevId: 374959054
Previously, registration was racy because we were publishing
hierarchies in the registry without fully initializing the underlying
filesystem. This led to concurrent mount(2)s discovering the partially
intialized filesystems and dropping the final refs on them which cause
them to be freed prematurely.
Reported-by: [email protected]
Reported-by: [email protected]
PiperOrigin-RevId: 373824552