Skip to content
Snippets Groups Projects
Select Git revision
  • fff168b028c767ac0497ae2450bb4043fc546b38
  • master default protected
  • android-msm-bullhead-3.10-nougat_kgdb_less_changes
  • android-msm-bullhead-3.10-nougat_kgdb
  • android-msm-bullhead-3.10-nougat_klist
  • android-4.4
  • android-msm-vega-4.4-oreo-daydream
  • android-msm-wahoo-4.4-p-preview-5
  • android-msm-wahoo-4.4-pie
  • android-msm-marlin-3.18-p-preview-5
  • android-msm-marlin-3.18-pie
  • android-msm-wahoo-2018.07-oreo-m2
  • android-msm-wahoo-2018.07-oreo-m4
  • android-msm-wahoo-4.4-p-preview-4
  • android-msm-bullhead-3.10-oreo-m6
  • android-msm-angler-3.10-oreo-m6
  • android-msm-marlin-3.18-p-preview-4
  • android-msm-stargazer-3.18-oreo-wear-dr
  • android-msm-catshark-3.18-oreo-wear-dr
  • android-msm-wahoo-4.4-oreo-m2
  • android-msm-wahoo-4.4-oreo-m4
  • android-daydreamos-8.0.0_r0.5
  • android-8.1.0_r0.92
  • android-8.1.0_r0.91
  • android-daydreamos-8.0.0_r0.4
  • android-p-preview-5_r0.2
  • android-p-preview-5_r0.1
  • android-9.0.0_r0.5
  • android-9.0.0_r0.4
  • android-9.0.0_r0.2
  • android-9.0.0_r0.1
  • android-8.1.0_r0.81
  • android-8.1.0_r0.80
  • android-8.1.0_r0.78
  • android-8.1.0_r0.76
  • android-8.1.0_r0.75
  • android-8.1.0_r0.72
  • android-8.1.0_r0.70
  • android-p-preview-4_r0.2
  • android-p-preview-4_r0.1
  • android-wear-8.0.0_r0.30
41 results

cgroup.c

Blame
  • cgroup.c 139.23 KiB
    /*
     *  Generic process-grouping system.
     *
     *  Based originally on the cpuset system, extracted by Paul Menage
     *  Copyright (C) 2006 Google, Inc
     *
     *  Notifications support
     *  Copyright (C) 2009 Nokia Corporation
     *  Author: Kirill A. Shutemov
     *
     *  Copyright notices from the original cpuset code:
     *  --------------------------------------------------
     *  Copyright (C) 2003 BULL SA.
     *  Copyright (C) 2004-2006 Silicon Graphics, Inc.
     *
     *  Portions derived from Patrick Mochel's sysfs code.
     *  sysfs is Copyright (c) 2001-3 Patrick Mochel
     *
     *  2003-10-10 Written by Simon Derr.
     *  2003-10-22 Updates by Stephen Hemminger.
     *  2004 May-July Rework by Paul Jackson.
     *  ---------------------------------------------------
     *
     *  This file is subject to the terms and conditions of the GNU General Public
     *  License.  See the file COPYING in the main directory of the Linux
     *  distribution for more details.
     */
    
    #include <linux/cgroup.h>
    #include <linux/cred.h>
    #include <linux/ctype.h>
    #include <linux/errno.h>
    #include <linux/fs.h>
    #include <linux/init_task.h>
    #include <linux/kernel.h>
    #include <linux/list.h>
    #include <linux/mm.h>
    #include <linux/mutex.h>
    #include <linux/mount.h>
    #include <linux/pagemap.h>
    #include <linux/proc_fs.h>
    #include <linux/rcupdate.h>
    #include <linux/sched.h>
    #include <linux/backing-dev.h>
    #include <linux/seq_file.h>
    #include <linux/slab.h>
    #include <linux/magic.h>
    #include <linux/spinlock.h>
    #include <linux/string.h>
    #include <linux/sort.h>
    #include <linux/kmod.h>
    #include <linux/module.h>
    #include <linux/delayacct.h>
    #include <linux/cgroupstats.h>
    #include <linux/hash.h>
    #include <linux/namei.h>
    #include <linux/pid_namespace.h>
    #include <linux/idr.h>
    #include <linux/vmalloc.h> /* TODO: replace with more sophisticated array */
    #include <linux/eventfd.h>
    #include <linux/poll.h>
    #include <linux/flex_array.h> /* used in cgroup_attach_proc */
    
    #include <linux/atomic.h>
    
    /*
     * cgroup_mutex is the master lock.  Any modification to cgroup or its
     * hierarchy must be performed while holding it.
     *
     * cgroup_root_mutex nests inside cgroup_mutex and should be held to modify