Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4255937ybc; Fri, 15 Nov 2019 01:26:15 -0800 (PST) X-Google-Smtp-Source: APXvYqzkJci0FM3FSMGBe8OaxPMyMANeBsH8N+XGnnhibhFnxkdB/rB9VuxkOSaLQzamNrxcTsLs X-Received: by 2002:a17:906:95c1:: with SMTP id n1mr12452047ejy.158.1573809975603; Fri, 15 Nov 2019 01:26:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573809975; cv=none; d=google.com; s=arc-20160816; b=PrShZIvD54Emyue8Rw7rEwR+KZ/s1KnMOtKsHzeCWcFGN8UTWaEq81RYLjWvegh4zJ XCrX2na0P8X9GpbImFpvQRftVptPwqcfj6mcOGmxwc9RMRc6a3MHTNDbo2kPC5A80twO tths8HWp/deqqjyU/rVwZigiiAkSsDYiNHHX2BS/iaYIm4/hVfiMBVYPvlG4/A21JMRX T/8xGTjDpQU9vSGUVP47GqTe9MN6PtpS7Aq1L7DAMvXXBlHvsuYDVSSjjUuHH4JyFMeL PibO/S31TZaortksLD31ttJOLjGXDxeOHQZ2+Xg4Sqc0fNEw+OEq4Q4tC6RY+IVdaxs/ mWxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=E5NJCPvuc3oH2wYFT9cv75IPz3w+7olilEdrf/3xSRU=; b=zaVv7VP6HjItPIVp3rffIpYhDwmuYg6KKWaqbhVsTlChXj4yKJsOrzIk5/K75tXQx7 I2cODL0ewtg6+nX0nZPKbvu300fArCMmR0qRqoQ3MzyuucMHj0FC3QZfzf3/IaKiu6Jp X1FLTvYvAcI+XpvdUgB8hfY+PGuDbUA9BsSDalwai6+B1j+yJ0hVcezHIFrMENVOnSIH OT3QL4pRhd5k9tgYY+CHLGDk3TyhnMjyvnxH8OFCPUeAqosyCbHyiFoPI3XsQYuGpD8v T2wEMUzxNsMna/nTJuDNnGKo11WhwwgkfKFOeYc1qbbheqdqqor+wIEgRj+qwuyREBRZ KoCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=g9AgrIO9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k18si6656908edj.94.2019.11.15.01.25.49; Fri, 15 Nov 2019 01:26:15 -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; dkim=pass header.i=@alien8.de header.s=dkim header.b=g9AgrIO9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726973AbfKOJY2 (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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