It provides similar functionality as v1 freezer, but the interfaceconforms to the cgroup v2 interface design principles, and itprovides a better user experience: tasks can be killed, ptrace works,there is no separate controller, which has to be enabled, etc.

v8->v7: - reworked/simplified cgroup frozen task accounting by merging nr_stopped and nr_frozen and removing nr_tasks_to_freeze - don't notify the parent process if the child is going from the stopped to the frozen state

v7->v6: - handle properly the case, when a task is both stopped and frozen - check for CGRP_FREEZE instead of CGRP_FROZEN in cgroup_exit() - minor cosmetic changes and rebase

v6->v5: - reverted to clear TIF_SIGPENDING with additional checks before schedule(), as proposed by Oleg Nesterov - made cgroup v2 freezer working with the system freezer (by using freezable_schedule()) - make freezer working with SIGSTOPped and PTRACEd tasks - added tests to cover freezing a cgroup with SIGSTOPped and PTRACEd tasks

v3->v2: - dropped TASK_FROZEN for now, frozen tasks are put into TASK_INTERRUPTIBLE state; it's probably not the final version, but the API question can be discussed separately - don't clear TIF_SIGPENDING before going to sleep, instead add task->frozen check in signal_pending_state() and recalc_sigpending() - cgroup-level counter are now synchronized using css_set_lock, which simplified the whole code (e.g. per-cgroup works were removed) - the amount of comments increased significantly - many other improvements incorporating feedback from Tejun and Oleg