Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1862528ybc; Wed, 20 Nov 2019 05:22:45 -0800 (PST) X-Google-Smtp-Source: APXvYqzGlV1ZQcIHAP57+VKVH7EtCVnrfWt4uKvlZUuB73WnaZUVwp4WMEySRfldfjaOvfmRtLIH X-Received: by 2002:a05:600c:21c9:: with SMTP id x9mr3209256wmj.54.1574256165346; Wed, 20 Nov 2019 05:22:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574256165; cv=none; d=google.com; s=arc-20160816; b=Bvcfub/58QKZgOiqJyKJlq24L/DyiLf3sssbeuMuagQPPYpjtn7uWIN/wZ0TaOE4SP heQxFgZn0ruyRVZCicEAVzmWw8IaT/5hGwEiBhnWQlwFqVkN+3cm0XtNAApbW3oo+B6r c/WPJKgLHcs35w0Lme4aJa7jzi/GWoz/xkzdi3CZjXoMVd+A5RjaAkn8BRojSYGwZXbT hmF1TKHEHsv81ctSNbhAdTBFwsSC8T8KUcwVgohqeCMo+3E33oNfdbOt2s0tSSa+j12Z gqNtXERiszo4nR2Zl7b3o9CrFC337vfUGE+8Ej1Z+oKXYr5Tzql/m6dQfvW1UnHnE3MN qZlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=CxBfZpCcWRY3Pv5CeJsuzcG++cXV/YHFXa0xz4AZF9U=; b=S4ttGYljnroSo12QeUEYuIend2mDjei2Yqmr9AfzSnbXUhDGaPEU5VB3Sy+3wuGK2v p9kefLWwo/wWg99rFPw4b0a3pZneBpECOnH/u7c78L8c5WuOtyLpW46TazSrkE4EjYHE +HR4lyB7lcFYhybGDwLm1ugACncDisOdqsMn2q0c/+ZMj6KFyl8EoFX7WISsi1rjhjF8 oO375UDZzzRiwnFArIZl8iSp39dY9QI/lX/jy0MqM+qNshlklqjQZEU6rkNwDKVKmzpY kH/iEHBLHGwdV+pLTWf3PPzpos5rWSfY5A+vZnVSiWc1mFXGK1A9HWdoj/jBSEUXR2Va tkZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i19si16424506edy.125.2019.11.20.05.22.21; Wed, 20 Nov 2019 05:22:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729149AbfKTLXF (ORCPT + 99 others); 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