Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4308643ybc; Fri, 22 Nov 2019 00:20:25 -0800 (PST) X-Google-Smtp-Source: APXvYqxaWOjvWA8Y+bWDZoS7uD/tHyanSoAMOvyl+TuqwM9CK6kfVJZBoWvAcNsqgqS8b4gWaUrT X-Received: by 2002:a17:906:4899:: with SMTP id v25mr20490470ejq.235.1574410825334; Fri, 22 Nov 2019 00:20:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574410825; cv=none; d=google.com; s=arc-20160816; b=Bu3nABpViz7rkNySIqvcxUT/hFyMzFNXkEonsgYCKmfq9edqsfAB8kYXGziqRaD/Qe zUMK3oB5Igo3Zxg4LnEKpByg37oVDt+yunhQ1qsxXw4I0KQSr1CcGblIYbpw+mv/iZ/s YJmYaOEV1znYlQOlMGCwwSGsPPRcisO5arXSuCel3CRcHbiIVXg3mSWliaUH4iEyqCDc N9Ef2NKY8M9iC/x1Xc2SmU8F0XCPfKUpB6DK67nGBjSlftW7USND/ZFwZcTFc/Fur1e8 M8cOBSgX9ou+N8PcDCOXVJGGPS/VPEhQdTOFIYYu5ca87m2NasL3O84SSem7TsNlGjP0 pLog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ysnhqpcDifNtA6ZEpiA8FU7zKxqqga8EknENlPaN0u8=; b=MgbKtFRuMxW46d0AYrLNHtz7BbC6ANNAZU+VsLpB6uEvBMeSrx06O7oV36qGDhkP60 TTKrspjDdkofjALyzLWEizM2NUPXZzbya/X52fwHWZAEpkgHZHJgQ3sv2ET/++l1Qujy Jir/xvU5eyVgR7fPtGIXMOrHA2zzuz3VxxDurgLbU1hETOWx+wDY9//FBzkE9g6vq+RJ +rZbbpRlsMsW/GonUOufZEHiMLpyjojJgUYuCfvQY2uU63sOnv3QjxBbHa5aQ/iCSpin vOqS+QI7AR9LqHyJxPBSBi6f6OmIeICM2gBdZaF9KsBourk4jdry+wkYxakxwZabdOHH KjBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YtlNhRdA; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c15si3741475ejd.74.2019.11.22.00.19.59; Fri, 22 Nov 2019 00:20:25 -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=@gmail.com header.s=20161025 header.b=YtlNhRdA; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726686AbfKVITA (ORCPT + 99 others); Fri, 22 Nov 2019 03:19:00 -0500 Received: from mail-il1-f182.google.com ([209.85.166.182]:39947 "EHLO mail-il1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726018AbfKVITA (ORCPT ); Fri, 22 Nov 2019 03:19:00 -0500 Received: by mail-il1-f182.google.com with SMTP id v17so2189530ilg.7; Fri, 22 Nov 2019 00:18:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ysnhqpcDifNtA6ZEpiA8FU7zKxqqga8EknENlPaN0u8=; b=YtlNhRdAncXEsgQ+beLXQOZQm2MQA/W53swM6V4mhNax3lEDiAejf05GfOiyJ19Py0 7te741stGu86F2U/IFoY2XQrGDxESPtCUUNMfRGpW58eUDw1q4MYLJL5w9lga4PjbpoY tjMZyFnxj7ILPTGAGSitHz5YRO7Yvgc8UFsAOdm6RKoEEwWA4HKmByUyCggvKP6IXjmf 8DM5SvBPmG8kXNbbzxYuEQdvuIxX7VONW41/j5V+kvzm7C4GfAl06J9uhWJjxL834yG1 sz28B/mFlFUPNwRH6zLNWeZwcOnBMs0cEvOxMd8a0uvsxd80b4dbRYv50Xh2hZ056b9E lM5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ysnhqpcDifNtA6ZEpiA8FU7zKxqqga8EknENlPaN0u8=; b=dy2fRvpKPmJjBqcx6EXGlQaRFoUP4WHHVBNE1FTEV9lq7KqZo0/IQ4n0dsIz3HfPuu Y+bjCAiLzINPRssTAstkyPuGHFxnLP89+z6ANPQ34C/V7to/kiQ+5NarwPw/LJHZvFoY vnUuwCcfLBusrXYd/XXSJlEjcLoEirIbHW6hDTozQWvgcBFikzcHkiM2Fv0iu2HWmhAs PoI4BHYl/kpaLhSn2+6RDTzzv0Vf6q5BneD/24WVgpPr3KvHjN1Licpuny/aLBn5gor7 q4HupomDshn7qD0NxLqQbIbGhQ8p/1l2OfHXtbHMdDi6vdW6Oc/CVOe2R+ozerVpVn5z MoNg== X-Gm-Message-State: APjAAAUGPKOMqXdyLsWQkpJzDsmmpjCkrVh0wuqZwJi+9sOkGCXForPS xJRC8F39IN3nftKjgR8pI8lZ9r99LO4F3s9Ab/Y= X-Received: by 2002:a92:5b86:: with SMTP id c6mr14683342ilg.135.1574410737554; Fri, 22 Nov 2019 00:18:57 -0800 (PST) MIME-Version: 1.0 References: <20191120081628.26701-1-yu.c.chen@intel.com> In-Reply-To: From: Yu Chen Date: Fri, 22 Nov 2019 16:18:46 +0800 Message-ID: Subject: Re: [PATCH][v3] x86/resctrl: Add task resctrl information display To: Thomas Gleixner Cc: Chen Yu , "the arch/x86 maintainers" , 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 Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, On Wed, Nov 20, 2019 at 7:23 PM Thomas Gleixner wrote: > > 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? > Yes, good idea, this is much more simpler. I'll send the new version out based on this. Thanks, Chenyu