android_kernel_xiaomi_sm8350/Documentation
Paul Menage 999cd8a450 cgroups: add a per-subsystem hierarchy_mutex
These patches introduce new locking/refcount support for cgroups to
reduce the need for subsystems to call cgroup_lock(). This will
ultimately allow the atomicity of cgroup_rmdir() (which was removed
recently) to be restored.

These three patches give:

1/3 - introduce a per-subsystem hierarchy_mutex which a subsystem can
     use to prevent changes to its own cgroup tree

2/3 - use hierarchy_mutex in place of calling cgroup_lock() in the
     memory controller

3/3 - introduce a css_tryget() function similar to the one recently
      proposed by Kamezawa, but avoiding spurious refcount failures in
      the event of a race between a css_tryget() and an unsuccessful
      cgroup_rmdir()

Future patches will likely involve:

- using hierarchy mutex in place of cgroup_lock() in more subsystems
 where appropriate

- restoring the atomicity of cgroup_rmdir() with respect to cgroup_create()

This patch:

Add a hierarchy_mutex to the cgroup_subsys object that protects changes to
the hierarchy observed by that subsystem.  It is taken by the cgroup
subsystem (in addition to cgroup_mutex) for the following operations:

- linking a cgroup into that subsystem's cgroup tree
- unlinking a cgroup from that subsystem's cgroup tree
- moving the subsystem to/from a hierarchy (including across the
  bind() callback)

Thus if the subsystem holds its own hierarchy_mutex, it can safely
traverse its own hierarchy.

Signed-off-by: Paul Menage <menage@google.com>
Tested-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-08 08:31:10 -08:00
..
ABI mm: show node to memory section relationship with symlinks in sysfs 2009-01-06 15:59:00 -08:00
accounting
acpi
aoe
arm Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel 2008-12-29 18:08:11 +00:00
auxdisplay
blackfin Blackfin arch: Add document about bfin-gpio 2009-01-07 23:14:38 +08:00
block Documentation: remove reference to ll_rw_blk.c and moved drivers/block/elevator.c 2008-12-29 08:28:43 +01:00
blockdev
cdrom
cgroups cgroups: add a per-subsystem hierarchy_mutex 2009-01-08 08:31:10 -08:00
connector
console
controllers memcg: fix swap accounting leak 2009-01-08 08:31:10 -08:00
cpu-freq doc: Update sh cpufreq documentation. 2008-12-22 18:44:47 +09:00
cpuidle
cris
crypto
development-process
device-mapper
DocBook wimax: Makefile, Kconfig and docbook linkage for the stack 2009-01-07 10:00:17 -08:00
driver-model
dvb V4L/DVB (9812): [PATCH] short help for Technisat cards to select the right configuration 2008-12-30 09:38:35 -02:00
early-userspace
fault-injection
fb [ARM] pxafb: add support for overlay1 and overlay2 as framebuffer devices 2008-12-29 18:00:04 +08:00
filesystems Merge branch 'proc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/adobriyan/proc 2009-01-07 12:01:06 -08:00
firmware_class
frv
hwmon Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6 2009-01-07 11:59:51 -08:00
i2c
i2o
ia64
ide ide: update warm-plug HOWTO 2009-01-06 17:21:00 +01:00
infiniband
input Merge commit 'v2.6.28-rc9' into next 2008-12-20 04:54:54 -05:00
ioctl documentation: update header file paths 2009-01-06 15:59:28 -08:00
isdn
ja_JP
kbuild kbuild: fix typos (s/bin_shipped/bin.o_shipped/) in Documentation 2009-01-07 21:44:23 +01:00
kdump
ko_KR
laptops trivial: fix an -> a typos in documentation and comments 2009-01-06 11:28:07 +01:00
lguest lguest: move the initial guest page table creation code to the host 2008-12-30 09:26:11 +10:30
m68k
make
mips documentation: update header file paths 2009-01-06 15:59:28 -08:00
mn10300
mtd
namespaces
netlabel
networking trivial: fix an -> a typos in documentation and comments 2009-01-06 11:28:07 +01:00
parisc
PCI PCI: Add pci_clear_master() as opposite of pci_set_master() 2009-01-07 11:13:23 -08:00
pcmcia
power
powerpc documentation: update header file paths 2009-01-06 15:59:28 -08:00
prctl
RCU Merge branch 'core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-12-30 16:10:19 -08:00
s390 documentation: update s390 header file paths 2009-01-06 15:59:28 -08:00
scheduler Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-12-28 12:27:58 -08:00
scsi trivial: Fix misspelling of "firmware" in docs for ncr53c8xx/sym53c8xx 2009-01-06 11:28:09 +01:00
serial
sh sh: Kill off remaining CONFIG_SH_KGDB bits. 2008-12-22 18:44:05 +09:00
sound Merge branch 'topic/oxygen' into to-push 2008-12-25 11:40:30 +01:00
sparc
spi hwmon: (lm70) Code streamlining and cleanup 2009-01-07 16:37:34 +01:00
sysctl mm: add dirty_background_bytes and dirty_bytes sysctls 2009-01-06 15:59:03 -08:00
telephony
thermal
timers
tracers tracing, doc: update mmiotrace documentation 2008-11-23 20:33:24 +01:00
uml
usb USB: add asynchronous autosuspend/autoresume support 2009-01-07 09:59:53 -08:00
video4linux V4L/DVB (10157): Add USB ID for the Sil4701 radio from DealExtreme 2009-01-02 17:13:56 -02:00
vm mm: remove try_to_munlock from vmscan 2009-01-06 15:59:03 -08:00
w1
watchdog
wimax i2400m: documentation and instructions for usage 2009-01-07 10:00:18 -08:00
x86 documentation: update header file paths 2009-01-06 15:59:28 -08:00
zh_CN
00-INDEX
applying-patches.txt
atomic_ops.txt
basic_profiling.txt
binfmt_misc.txt
braille-console.txt
bt8xxgpio.txt
BUG-HUNTING
c2port.txt
cachetlb.txt
Changes
CodingStyle
cpu-hotplug.txt x86: use possible_cpus=NUM to extend the possible cpus allowed 2008-12-18 12:08:05 +01:00
cpu-load.txt
cpusets.txt
cputopology.txt sysfs: add documentation to cputopology.txt for system cpumasks 2008-12-19 17:47:12 +10:30
credentials.txt
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt
dell_rbu.txt trivial: fix an -> a typos in documentation and comments 2009-01-06 11:28:07 +01:00
devices.txt
DMA-API.txt DMA-API.txt: fix description of pci_map_sg/dma_map_sg scatterlists handling 2008-12-01 19:55:24 -08:00
DMA-attributes.txt
DMA-ISA-LPC.txt
DMA-mapping.txt documentation: update header file paths 2009-01-06 15:59:28 -08:00
dontdiff
edac.txt
eisa.txt
email-clients.txt
exception.txt
feature-removal-schedule.txt hwmon: Deprecate the fscher and fscpos drivers 2009-01-07 16:37:33 +01:00
ftrace.txt ftrace: improve documentation 2008-11-28 13:15:14 +01:00
gpio.txt
highuid.txt
HOWTO
hw_random.txt
ics932s401
initrd.txt
Intel-IOMMU.txt
io_ordering.txt
io-mapping.txt
IO-mapping.txt
iostats.txt
IPMI.txt
IRQ-affinity.txt
IRQ.txt
irqflags-tracing.txt
isapnp.txt
java.txt
kernel-doc-nano-HOWTO.txt documentation: how to use DOC: section blocks 2009-01-06 15:59:28 -08:00
kernel-docs.txt
kernel-parameters.txt memcg: mem+swap controller Kconfig 2009-01-08 08:31:05 -08:00
keys-request-key.txt
keys.txt
kobject.txt kobject: Make Documentation/kobject.txt a little more coherent. 2009-01-06 10:44:32 -08:00
kprobes.txt kprobes: support probing module __exit function 2009-01-06 15:59:21 -08:00
kref.txt
ldm.txt
leds-class.txt
local_ops.txt documentation: local_ops fix on_each_cpu 2008-12-01 13:51:26 +01:00
lockdep-design.txt
lockstat.txt
logo.gif
logo.txt
magic-number.txt documentation: update header file paths 2009-01-06 15:59:28 -08:00
Makefile
ManagementStyle
markers.txt markers: comment marker_synchronize_unregister() on data dependency 2008-11-28 16:47:41 +01:00
mca.txt
md.txt
memory-barriers.txt
memory-hotplug.txt mm: show node to memory section relationship with symlinks in sysfs 2009-01-06 15:59:00 -08:00
memory.txt
mono.txt
mutex-design.txt
nmi_watchdog.txt
nommu-mmap.txt
numastat.txt
oops-tracing.txt
parport-lowlevel.txt
parport.txt
pi-futex.txt
pnp.txt
preempt-locking.txt
printk-formats.txt
prio_tree.txt
rbtree.txt
rfkill.txt
robust-futex-ABI.txt
robust-futexes.txt
rt-mutex-design.txt
rt-mutex.txt
rtc.txt
SAK.txt
SecurityBugs
SELinux.txt
serial-console.txt
sgi-ioc4.txt
sgi-visws.txt
SM501.txt
Smack.txt
sparse.txt
spinlocks.txt
stable_api_nonsense.txt
stable_kernel_rules.txt
SubmitChecklist
SubmittingDrivers
SubmittingPatches
svga.txt
sysfs-rules.txt
sysrq.txt
tracepoints.txt tracepoints: Documentation TPPROTO misspelt in Documentation/tracepoints.txt 2008-11-29 15:13:42 +01:00
unaligned-memory-access.txt
unicode.txt
unshare.txt
VGA-softcursor.txt
video-output.txt
volatile-considered-harmful.txt
voyager.txt
zorro.txt