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.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,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 C017EC432C3 for ; Fri, 15 Nov 2019 09:24:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9A2C420733 for ; Fri, 15 Nov 2019 09:24:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alien8.de header.i=@alien8.de header.b="g9AgrIO9" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726920AbfKOJY2 (ORCPT ); Fri, 15 Nov 2019 04:24:28 -0500 Received: from mail.skyhub.de ([5.9.137.197]:32984 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725829AbfKOJY1 (ORCPT ); Fri, 15 Nov 2019 04:24:27 -0500 Received: from zn.tnic (p200300EC2F0CC300B4C5AF24BE56B25A.dip0.t-ipconnect.de [IPv6:2003:ec:2f0c:c300:b4c5:af24:be56:b25a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 533251EC0D06; Fri, 15 Nov 2019 10:24:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1573809866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=E5NJCPvuc3oH2wYFT9cv75IPz3w+7olilEdrf/3xSRU=; b=g9AgrIO9wgjkcYp8jRyNKRcrDnssjEh83KqxdpQWp2fIdYqh9E/PcsilJGdsWdKVCN8Xf2 LjvjtcxyGOCbcWmiVpRKbv7FPRg6kwHcRq6ekSGPqwOzTz/sa8NMLhQHAAsSjJoyPNVgQF 7qJDlykU9nRi7aBcsSDXvh5o1xqDSlg= Date: Fri, 15 Nov 2019 10:24:20 +0100 From: Borislav Petkov To: Chen Yu Cc: x86@kernel.org, "H. Peter Anvin" , Ingo Molnar , Thomas Gleixner , Peter Zijlstra , Will Deacon , Fenghua Yu , Reinette Chatre , Tony Luck , Andrew Morton , Alexey Dobriyan , Michal Hocko , Kees Cook , Christian Brauner , Shakeel Butt , Casey Schaufler , Konstantin Khlebnikov , Kent Overstreet , Linus Torvalds , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 2/2][v2] x86/resctrl: Add task resctrl information display Message-ID: <20191115092420.GF18929@zn.tnic> References: <5dcd6580b51342c0803db6bc27866dd569914b0d.1573788882.git.yu.c.chen@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5dcd6580b51342c0803db6bc27866dd569914b0d.1573788882.git.yu.c.chen@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Fri, Nov 15, 2019 at 01:25:06PM +0800, 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 > > If the resctrl filesystem has not been mounted, > reading /proc/{pid}/resctrl returns an error: > cat: /proc/1193/resctrl: No such device Eww, this doesn't sound very user-friendly. How is the user supposed to know that the resctrl fs needs to be mounted for this to work? Why does the resctrl fs need to be mounted at all to show this? I'm guessing if it is not mounted, you have no groups so you don't have to return an error - you simply return "". Right? > Tested-by: Jinshi Chen > Reviewed-by: Reinette Chatre > Reviewed-by: Fenghua Yu > Reviewed-by: Tony Luck When you send a new version which has non-trivial changes, you should drop those tags because they don't apply anymore. Unless those people have managed to review and test the new version ... Looking at CONFIG_PROC_PID_ARCH_STATUS for an example of proc/ calling arch-specific functions, I guess you need to do: select CPU_RESCTRL if PROC_FS Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette