From patchwork Mon Apr 17 23:33:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Moger, Babu" X-Patchwork-Id: 8330 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2471111vqo; Mon, 17 Apr 2023 16:40:40 -0700 (PDT) X-Google-Smtp-Source: AKy350bCKdcFbf8uOP6emYwqxsrc/4m+Mmi/+fdWS3EvxXws7a3nulwmyVCSSPRtgopx4w1xq0DF X-Received: by 2002:a17:903:234b:b0:1a1:953b:9559 with SMTP id c11-20020a170903234b00b001a1953b9559mr316409plh.3.1681774840493; Mon, 17 Apr 2023 16:40:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1681774840; cv=pass; d=google.com; s=arc-20160816; b=N4uJiL3jKjjaMDk1t9PHrqcK6osryXvTaIH22V4JwfdKyxSBN6E3F6DVsCsHLKbYcQ EUDUD3SSGJxqXhRsgbsi0QCIXLMZxht01jvbe6IshKTdGCZ16CYTpmOq2QuYSqiuLOeC +vCA6C1elTyuiqdkPbiKGDa33tNzLXFR+5dl0ICO4sOYTI77GkkdUEcBsejGYtmTXmcO y+UA2ZZ/63gpO7qJSzv3mQEOFqL4LW7OgWwhunrfLCJDfEnftSGDFR91aVpibhpykJ1c v4oiFQaSct7IqeLEm3iz3fyIIo2RfpRwGNYw6YwUbKM4Wd8heboFgO+IFX/jWYPMa+EH zoSg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:date:cc:to:from:subject:dkim-signature; bh=yJIi83lyubFdDpXE9qeWwL1EitAWnX7CQcm381VpOVI=; b=oKO4Ki7jxLte5VV68AH1coccJkNvka3+TdLZ790FEu3cotYxhizD1mKgpCgQmaMKBt KCEWmBwbvvZDuoi+/QkfeSReescXmeyWwsJ/mp1u9kyy7BfLsD1h1O8nveVeNqocdfYK SPsmhIg2MkkgnDos+YA8R3ZmFHIrS7TL8WLT3BQh50dOdGbbv0XfCofBFYVGg4vFQ0T7 eaS/S1fTNtup7uKoC5BS0umr9VQyFxsSpeoSc5oxdml9CFZyg6bNpbQfgaqtfTkve1aT nnJuJIRO8GyEslhPaIV9QU59YZAB4/6LQReE40bjNMFDpLALKmvVpKXjGxu7168+eHcv RmXw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=e0Y+umfK; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h125-20020a636c83000000b0051b7f451cc6si8453347pgc.539.2023.04.17.16.40.24; Mon, 17 Apr 2023 16:40:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=e0Y+umfK; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230253AbjDQXeU (ORCPT + 99 others); Mon, 17 Apr 2023 19:34:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230210AbjDQXeP (ORCPT ); Mon, 17 Apr 2023 19:34:15 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2084.outbound.protection.outlook.com [40.107.223.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 306B94C2B; Mon, 17 Apr 2023 16:34:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XD5VA58+SEozbSzU8LlNwTVpEJToJr9Kzao1iQMDQZlNfhlLICyN2nPOW28iWidtEJUbK9CLj8vpOvju/z3xuyPZEQDqfGJJbLR6RMnD+DDhB5lAZgmFyGl+3HwAEfeOqvxuEPo24Poz3nxr0LO9laQ2JW+dZCFciHnW2KSEkarS4KeE0ttNn1TkeHY+EatOz8+Zjlv3Jg6x/CP3FJ6dSyKeQiZMluxPGkNCrcgPZQiEUCxmNRinixWecDgX5sZma8nnndTSmPLHb9CIYWORfRSnV6HLshYgZtrtlcA7XtXJpA98LvDwROaiZFFBst3glWZKogXOKt1ZrZgYRjy/zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yJIi83lyubFdDpXE9qeWwL1EitAWnX7CQcm381VpOVI=; b=mK0rHklmSqrS5xrGs+VJCu1Lbrja1e1Wo2fTBwv4OXKqlFhPrUfj1bJq2EKLZTwSLKtw/l+BXCML6R0n6qhEwYr9uM5UXMG9BK57wHZHholdu6tR/OF11b4r+84PnhJrXEZC8Yd3AuHLOuMmd9+D1ui8Ks3l9bKrkm+npqlWdLClEBYF0GZM/HnsF1pI0D+6+Tda3dkCzRdrLJkbB4YU4ABgjT0oDR6k2wz+yMnWo8+3L12J3ZACCvka+AMVNytTASjEEi76Xj2cJuilltoVe9/u6g5ToKiPGwIBN8+MrP/EPLgzqvCKolpMbIDUCEcJQqQFjH4KW0xgzhMBZZYYZg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=infradead.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yJIi83lyubFdDpXE9qeWwL1EitAWnX7CQcm381VpOVI=; b=e0Y+umfKxfRkZ2y+5Rte7WApF/IgOhqSzI690cfo4nlRoOLAcNS9WLWQNlO4dXP2E6VKR/Xx/rpSzhz7kmU8ccGzZqucOI7mgPHaBWn7tNsV/spGpCeca+x+a3RhCxiMGm5X2z5H75podMvCgJdKr+vOzaodynTemKcGjS9pFdI= Received: from DM6PR13CA0062.namprd13.prod.outlook.com (2603:10b6:5:134::39) by CH0PR12MB5284.namprd12.prod.outlook.com (2603:10b6:610:d7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.45; Mon, 17 Apr 2023 23:34:02 +0000 Received: from DM6NAM11FT038.eop-nam11.prod.protection.outlook.com (2603:10b6:5:134:cafe::40) by DM6PR13CA0062.outlook.office365.com (2603:10b6:5:134::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.19 via Frontend Transport; Mon, 17 Apr 2023 23:34:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT038.mail.protection.outlook.com (10.13.173.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6319.20 via Frontend Transport; Mon, 17 Apr 2023 23:34:02 +0000 Received: from [127.0.1.1] (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 17 Apr 2023 18:33:59 -0500 Subject: [PATCH v4 0/7] x86/resctrl: Miscellaneous resctrl features From: Babu Moger To: , , , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Date: Mon, 17 Apr 2023 18:33:56 -0500 Message-ID: <168177435378.1758847.8317743523931859131.stgit@bmoger-ubuntu> User-Agent: StGit/1.1.dev103+g5369f4c MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT038:EE_|CH0PR12MB5284:EE_ X-MS-Office365-Filtering-Correlation-Id: 50c00c67-5438-4ef0-d7c8-08db3f9c39d8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kjD2VyZnrNrCMW8QsqyxzcpBzNpEM3nQSx64/1maf5iTQH3e2uKW0uI+WtNPMWkXkolnpbclAkeuQZRQtoGhpDPgs9BVcOB/xS1+A77c47gIPbbr2vC7YGiKzqgPijllnBCv+5ae3V5yfb/RCsXWqoYsfPfJo7w+poQ6yWTES3QShrd8yzF8pXVy5ADGP6grCU/sqeOs+KEqaCGFAfI2F6RK0CgfZaIDjONcpni746LYBA4M+cLkCXVTjGIq0qfgcHMI4JiDTqGMh7TrA9cQZP0xxRYTfIt//Yaaq/E0ChluvU0Co19X5NU9U1DrB53WFz1b/s4bXtBn58ta+IQB48wiIQ1vksO2Z1ZYTNuyIo+vZ+k7S8w/u5nABBTNtksOcq/mHqYdccapA7ArlZOSKtAcTHCazkXbXkip7dp7Yb9IQMPu/pIALKE/XYg3e83Hq3L1r5Rnnskt5EPq5BxUFyDxloCwAHh2+KXWX8xSxhQ6vR5BKn1YX4YcmbxzCSiV3UjRLDKAuh8HfB4WXCeozVJsLkNYrSjESf5UQrdjpB9FGmaS+uzXAGp25XHpoYd00Vythc67WZLSHIXbLGR05O0fEUzbN8ceYz+VTVafy9y7Q2ZFfrflhmVYYAsWSg1LdmpnOuG1xO0Yy4McqTYhjbHKnz9XMOa7eHVBjDO+oZWrE17jzTjTqSooMEC9LvqJOstndP1INV6OLLs6fYKTs3CU6ZZ1eBmygDpYmeOtYG1fp0o81oVHHhaP/N9O6i54lHohLP4OfBezPlpVe4terGTWGuTy/PhJz3IdoYyho0g= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(7916004)(4636009)(376002)(346002)(136003)(39860400002)(396003)(451199021)(46966006)(40470700004)(36840700001)(4326008)(70206006)(70586007)(2906002)(86362001)(426003)(336012)(82310400005)(7416002)(7406005)(5660300002)(44832011)(8936002)(40460700003)(41300700001)(110136005)(478600001)(16576012)(54906003)(103116003)(316002)(6666004)(186003)(16526019)(356005)(82740400003)(26005)(81166007)(9686003)(33716001)(47076005)(966005)(83380400001)(36860700001)(8676002)(40480700001)(71626016)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2023 23:34:02.0236 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 50c00c67-5438-4ef0-d7c8-08db3f9c39d8 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT038.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5284 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763468734966847453?= X-GMAIL-MSGID: =?utf-8?q?1763468734966847453?= These series adds support few minor features. 1. Support assigning multiple tasks to control/mon groups in one command. 2. Add debug mount option for resctrl interface. 3. Add RMID and CLOSID in resctrl interface when mounted with debug option. 4. While doing these above changes, found that rftype flags needed some cleanup. They were named inconsistently. Re-arranged them much more cleanly now. Hope it can help future additions. --- v4: Changes since v3 Addressed comments from Reinette and others. Removed newline requirement when adding tasks. Dropped one of the changes on flags. Kept the flag names mostly same. Changed the names of closid and rmid to ctrl_hw_id and mon_hw_id respectively. James had some concerns about adding these files. But I thing it is big problem. Please comment back if we can do better. Tried to address Reinette's comment on patch 7. But due to current code design I could not do it exact way. But changed it little bit to make it easy debug file additions in the future. v3: Changes since v2 Still waiting for more comments. While waiting, addressed few comments from Fenghua. Added few more texts in the documentation about multiple tasks assignment feature. Added pid in last_cmd_status when applicable. Introduced static resctrl_debug to save the debug option. Few minor text changes. v2: Changes since v1 a. Removed the changes to add the task's threads automatically. It required book keeping to handle the failures and gets complicated. Removed that change for now. b. Added -o debug option to mount in debug mode(comment from Fenghua) c. Added debug files rmid and closid. Stephane wanted to rename them more generic to accommodate ARM. It kind of loses meaning if is renamed differently. Kept it same for now. Will change if he feels strong about it. v3: https://lore.kernel.org/lkml/167778850105.1053859.14596357862185564029.stgit@bmoger-ubuntu/ v2: https://lore.kernel.org/lkml/167537433143.647488.9641864719195184123.stgit@bmoger-ubuntu/ v1: https://lore.kernel.org/lkml/167278351577.34228.12803395505584557101.stgit@bmoger-ubuntu/ Babu Moger (7): x86/resctrl: Add multiple tasks to the resctrl group at once x86/resctrl: Remove unnecessary rftype flags x86/resctrl: Rename rftype flags for consistency x86/resctrl: Re-arrange RFTYPE flags and add more comments x86/resctrl: Introduce "-o debug" mount option x86/resctrl: Display CLOSID and RMID for the resctrl groups x86/resctrl: Add debug files when mounted with debug option Documentation/x86/resctrl.rst | 29 +++- arch/x86/kernel/cpu/resctrl/internal.h | 62 ++++++-- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 188 ++++++++++++++++++++++--- 3 files changed, 243 insertions(+), 36 deletions(-) --