From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE8C9C432C0 for ; Wed, 20 Nov 2019 11:23:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA5932243F for ; Wed, 20 Nov 2019 11:23:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729153AbfKTLXF (ORCPT ); Wed, 20 Nov 2019 06:23:05 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:56398 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728376AbfKTLXF (ORCPT ); Wed, 20 Nov 2019 06:23:05 -0500 Received: from p5b06da22.dip0.t-ipconnect.de ([91.6.218.34] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iXO4N-0005RU-Kd; Wed, 20 Nov 2019 12:22:47 +0100 Date: Wed, 20 Nov 2019 12:22:46 +0100 (CET) From: Thomas Gleixner To: Chen Yu cc: x86@kernel.org, Borislav Petkov , "H. Peter Anvin" , Ingo Molnar , Fenghua Yu , Reinette Chatre , Tony Luck , Alexey Dobriyan , Andrew Morton , Mauro Carvalho Chehab , Michal Hocko , Linus Torvalds , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Chen Yu Subject: Re: [PATCH][v3] x86/resctrl: Add task resctrl information display In-Reply-To: <20191120081628.26701-1-yu.c.chen@intel.com> Message-ID: References: <20191120081628.26701-1-yu.c.chen@intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 20 Nov 2019, Chen Yu wrote: > Monitoring tools that want to find out which resctrl CTRL > and MONITOR groups a task belongs to must currently read > the "tasks" file in every group until they locate the process > ID. > > Add an additional file /proc/{pid}/resctrl to provide this > information. > > For example: > cat /proc/1193/resctrl > CTRL_MON:/ctrl_grp0 > MON:/ctrl_grp0/mon_groups/mon_grp0 The formatting is quite ugly and I don't see why this needs to be multiple lines and have these uppercase prefixes. A task can only be part of one control group and of one monitoring group which is associated to the control group. So just providing: 1) "" 2) "/" 3) "/mon_groups/mon0" 4) "/group0" 5) "/group0/mon_groups/mon1" is simple and clear enough, i.e.: #1: Resctrl is not available #2: Task is part of the root group, task not associated to any monitoring group #3: Task is part of the root group and monitoring group mon0 #4: Task is part of control group group0, task not associated to any monitoring group #5: Task is part of control group group0 and monitoring group mon1 Hmm? Thanks, tglx