From: Roman Gushchin <guroan@gmail.com>
To: Tejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@fb.com, Roman Gushchin <guro@fb.com>
Subject: [PATCH v2 0/6] freezer for cgroup v2
Date: Mon, 12 Nov 2018 15:04:15 -0800 [thread overview]
Message-ID: <20181112230422.5911-1-guro@fb.com> (raw)
This patchset implements freezer for cgroup v2.
It provides similar functionality as v1 freezer, but the interface
conforms to the cgroup v2 interface design principles, and it
provides a better user experience: tasks can be killed, ptrace works,
there is no separate controller, which has to be enabled, etc.
Patches (1) and (2) are some preparational work, patch (3) contains
the implementation, patch (4) is a small cgroup kselftest fix,
patch (5) covers freezer adds 6 new kselftests to cover the freezer
functionality. Patch (6) adds corresponding docs.
v2->v1:
- fixed locking aroung calling cgroup_freezer_leave()
- added docs
Roman Gushchin
cgroup: rename freezer.c into legacy_freezer.c
cgroup: implement __cgroup_task_count() helper
cgroup: cgroup v2 freezer
kselftests: cgroup: don't fail on cg_kill_all() error in cg_destroy()
kselftests: cgroup: add freezer controller self-tests
cgroup: document cgroup v2 freezer interface
Documentation/admin-guide/cgroup-v2.rst | 26 +
include/linux/cgroup-defs.h | 33 +
include/linux/cgroup.h | 42 ++
include/linux/sched.h | 5 +-
include/linux/sched/jobctl.h | 5 +-
kernel/cgroup/Makefile | 4 +-
kernel/cgroup/cgroup-internal.h | 1 +
kernel/cgroup/cgroup-v1.c | 16 -
kernel/cgroup/cgroup.c | 132 +++-
kernel/cgroup/freezer.c | 590 +++++----------
kernel/cgroup/legacy_freezer.c | 481 ++++++++++++
kernel/ptrace.c | 6 +
kernel/signal.c | 54 +-
tools/testing/selftests/cgroup/.gitignore | 1 +
tools/testing/selftests/cgroup/Makefile | 2 +
tools/testing/selftests/cgroup/cgroup_util.c | 85 ++-
tools/testing/selftests/cgroup/cgroup_util.h | 7 +
tools/testing/selftests/cgroup/test_freezer.c | 685 ++++++++++++++++++
18 files changed, 1724 insertions(+), 451 deletions(-)
create mode 100644 kernel/cgroup/legacy_freezer.c
create mode 100644 tools/testing/selftests/cgroup/test_freezer.c
--
2.17.2
next reply other threads:[~2018-11-12 23:04 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-12 23:04 Roman Gushchin [this message]
2018-11-12 23:04 ` [PATCH] cgroup: document cgroup v2 freezer interface Roman Gushchin
2018-11-12 23:04 ` [PATCH v2 1/6] cgroup: rename freezer.c into legacy_freezer.c Roman Gushchin
2018-11-12 23:04 ` [PATCH v2 2/6] cgroup: implement __cgroup_task_count() helper Roman Gushchin
2018-11-12 23:04 ` [PATCH v2 3/6] cgroup: cgroup v2 freezer Roman Gushchin
2018-11-13 2:08 ` Tejun Heo
2018-11-13 18:47 ` Roman Gushchin
2018-11-13 19:15 ` Tejun Heo
2018-11-13 20:55 ` Roman Gushchin
2018-11-13 20:58 ` Tejun Heo
2018-11-13 15:37 ` Oleg Nesterov
2018-11-13 15:43 ` Tejun Heo
2018-11-13 16:00 ` Oleg Nesterov
2018-11-13 15:48 ` Oleg Nesterov
2018-11-13 21:59 ` Roman Gushchin
2018-11-14 16:56 ` Oleg Nesterov
2018-11-14 17:06 ` Roman Gushchin
2018-11-14 17:36 ` Oleg Nesterov
2018-11-14 17:39 ` Roman Gushchin
2018-11-28 17:36 ` Roman Gushchin
2018-11-12 23:04 ` [PATCH v2 4/6] kselftests: cgroup: don't fail on cg_kill_all() error in cg_destroy() Roman Gushchin
2018-11-12 23:04 ` [PATCH v2 5/6] kselftests: cgroup: add freezer controller self-tests Roman Gushchin
2018-11-12 23:04 ` [PATCH v2 6/6] cgroup: document cgroup v2 freezer interface Roman Gushchin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181112230422.5911-1-guro@fb.com \
--to=guroan@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=guro@fb.com \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox