• Fenghua Yu's avatar
    x86/intel_rdt: Add mkdir to resctrl file system · 60cf5e10
    Fenghua Yu authored
    Resource control groups are represented as directories in the resctrl
    file system. The root directory describes the default resources available
    to tasks that have not been assigned specific resources. Other directories
    can be created at the root level to make new resource groups. It is not
    permitted to make directories within other directories.
    
    Hardware uses a CLOSID (Class of service ID) to determine which resource
    limits are currently in effect. The exact number available is enumerated
    by CPUID leaf 0x10, but on current implementations it is a small number.
    We implement a simple bitmask allocator for CLOSIDs.
    
    Each resource control group uses one CLOSID, which limits the total number
    of directories that can be created.
    
    Resource groups can be removed using rmdir.
    Signed-off-by: default avatarFenghua Yu <fenghua.yu@intel.com>
    Cc: "Ravi V Shankar" <ravi.v.shankar@intel.com>
    Cc: "Tony Luck" <tony.luck@intel.com>
    Cc: "Shaohua Li" <shli@fb.com>
    Cc: "Sai Prakhya" <sai.praneeth.prakhya@intel.com>
    Cc: "Peter Zijlstra" <peterz@infradead.org>
    Cc: "Stephane Eranian" <eranian@google.com>
    Cc: "Dave Hansen" <dave.hansen@intel.com>
    Cc: "David Carrillo-Cisneros" <davidcc@google.com>
    Cc: "Nilay Vaish" <nilayvaish@gmail.com>
    Cc: "Vikas Shivappa" <vikas.shivappa@linux.intel.com>
    Cc: "Ingo Molnar" <mingo@elte.hu>
    Cc: "Borislav Petkov" <bp@suse.de>
    Cc: "H. Peter Anvin" <h.peter.anvin@intel.com>
    Link: http://lkml.kernel.org/r/1477692289-37412-6-git-send-email-fenghua.yu@intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    60cf5e10
intel_rdt_rdtgroup.c 15.3 KB