lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1431549318-16756-1-git-send-email-tj@kernel.org>
Date:	Wed, 13 May 2015 16:35:15 -0400
From:	Tejun Heo <tj@...nel.org>
To:	lizefan@...wei.com
Cc:	cgroups@...r.kernel.org, mingo@...hat.com, peterz@...radead.org,
	linux-kernel@...r.kernel.org
Subject: [PATCHSET] cgroup, sched: restructure threadgroup locking and replace it with a percpu_rwsem

threadgroup locking was added because cgroup needs threadgroups to
stay stable across attach operations.  It was implemented as a
per-signal_struct generic locking mechanism so that other users which
require threadgroups stable across blocking operations can use it too;
however, it hasn't grown any other use cases and still conditionalized
on CONFIG_CGROUPS.

It turns out that a single percpu_rwsem would serve cgroup's use case
better as it's lighter on the thread operations and allows atomic
operations across multiple processes.  We can change the generic
threadgroup lock mechanism to do that but it's pointless to put this
in core task code.  What's necessary from the task code is a place
which subsystems needing synchronization against threadgroup
operations can hook into so that they can implement the necessary
exclusion.

This patchset moves the specific locking details into cgroup proper
leaving threadgroup_changes_begin/end() as the section markers and
then converts the cgroup specific locking to use a percp_rwsem.

This patchset contains the following three patches.

 0001-sched-cgroup-reorganize-threadgroup-locking.patch
 0002-sched-cgroup-replace-signal_struct-group_rwsem-with-.patch
 0003-cgroup-simplify-threadgroup-locking.patch

0001 moves threadgroup locking details into cgroup proper.

0002-0003 convert per-signal_struct group_rwsem with a global
percpu_rwsem.

This patchset is on top of

  cgroup/for-4.2 d0f702e648dc ("cgroup: fix some comment typos")
+ [1] [PATCH] cgroup: separate out include/linux/cgroup-defs.h
+ [2] [PATCH] cgroup: reorganize include/linux/cgroup.h

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-threadgroup-percpu-rwsem

diffstat follows.  Thanks.

 include/linux/cgroup-defs.h |   33 ++++++++++++++++++++
 include/linux/init_task.h   |    8 ----
 include/linux/sched.h       |   65 ++++++++++------------------------------
 init/Kconfig                |    1
 kernel/cgroup.c             |   71 ++++++++++++++++----------------------------
 kernel/fork.c               |    4 --
 6 files changed, 78 insertions(+), 104 deletions(-)

--
tejun

[1] http://lkml.kernel.org/g/20150513193840.GC11388@htj.duckdns.org
[2] http://lkml.kernel.org/g/20150513202416.GE11388@htj.duckdns.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ