From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754673AbcIHWRk (ORCPT ); Thu, 8 Sep 2016 18:17:40 -0400 Received: from mga05.intel.com ([192.55.52.43]:7849 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751522AbcIHWRh (ORCPT ); Thu, 8 Sep 2016 18:17:37 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,302,1470726000"; d="scan'208";a="1047560103" Date: Thu, 8 Sep 2016 18:17:47 -0700 From: Fenghua Yu To: Shaohua Li Cc: Fenghua Yu , Thomas Gleixner , "H. Peter Anvin" , Ingo Molnar , Tony Luck , Peter Zijlstra , Tejun Heo , Borislav Petkov , Stephane Eranian , Marcelo Tosatti , David Carrillo-Cisneros , Ravi V Shankar , Vikas Shivappa , Sai Prakhya , linux-kernel , x86 Subject: Re: [PATCH v2 06/33] Documentation, x86: Documentation for Intel resource allocation user interface Message-ID: <20160909011746.GA42229@linux.intel.com> References: <1473328647-33116-1-git-send-email-fenghua.yu@intel.com> <1473328647-33116-7-git-send-email-fenghua.yu@intel.com> <20160908220119.GA64153@shli-mbp.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160908220119.GA64153@shli-mbp.local> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 08, 2016 at 03:01:20PM -0700, Shaohua Li wrote: > On Thu, Sep 08, 2016 at 02:57:00AM -0700, Fenghua Yu wrote: > > From: Fenghua Yu > > > > The documentation describes user interface of how to allocate resource > > in Intel RDT. > > > > Please note that the documentation covers generic user interface. Current > > patch set code only implemente CAT L3. CAT L2 code will be sent later. > > > > Signed-off-by: Fenghua Yu > > Reviewed-by: Tony Luck > > --- > > Documentation/x86/intel_rdt_ui.txt | 164 +++++++++++++++++++++++++++++++++++++ > > 1 file changed, 164 insertions(+) > > create mode 100644 Documentation/x86/intel_rdt_ui.txt > > > > diff --git a/Documentation/x86/intel_rdt_ui.txt b/Documentation/x86/intel_rdt_ui.txt > > new file mode 100644 > > index 0000000..27de386 > > --- /dev/null > > +++ b/Documentation/x86/intel_rdt_ui.txt > > @@ -0,0 +1,164 @@ > > +User Interface for Resource Allocation in Intel Resource Director Technology > > + > > +Copyright (C) 2016 Intel Corporation > > + > > +Fenghua Yu > > +Tony Luck > > + > > +This feature is enabled by the CONFIG_INTEL_RDT Kconfig and the > > +X86 /proc/cpuinfo flag bits "rdt", "cat_l3" and "cdp_l3". > > + > > +To use the feature mount the file system: > > + > > + # mount -t resctrl resctrl [-o cdp,verbose] /sys/fs/resctrl > > + > > +mount options are: > > + > > +"cdp": Enable code/data prioritization in L3 cache allocations. > > + > > +"verbose": Output more info in the "info" file under info directory > > + and in dmesg. This is mainly for debug. > > + > > + > > +Resource groups > > +--------------- > > +Resource groups are represented as directories in the resctrl file > > +system. The default group is the root directory. Other groups may be > > +created as desired by the system administrator using the "mkdir(1)" > > +command, and removed using "rmdir(1)". > > + > > +There are three files associated with each group: > > + > > +"tasks": A list of tasks that belongs to this group. Tasks can be > > + added to a group by writing the task ID to the "tasks" file > > + (which will automatically remove them from the previous > > + group to which they belonged). New tasks created by fork(2) > > + and clone(2) are added to the same group as their parent. > > + If a pid is not in any sub partition, it is in root partition > > + (i.e. default partition). > Hi Fenghua, > > Will you add a 'procs' interface to allow move a process into a group? Using > the 'tasks' interface to move process is inconvenient and has race conditions > (eg, some new threads could be escaped). We don't plan to add a 'procs' interface for rdtgroup. We only use resctrl interface to allocate resources. Why the "tasks" is inconvenient? If sysadmin wants to allocte a portion of L3 for a pid, the operation in resctl is to write the pid to a "tasks". While in 'procs', the operation is to write a partition to a pid. If considering convenience, they are same, right? A thread uses either default partition (in root dir) or a sub partition (in sub-directory). Sysadmin can control that. Kernel handles race condition. Any issue with that? Thanks. -Fenghua The same