From patchwork Thu May 25 21:40:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Jiang X-Patchwork-Id: 13255710 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12C5AC77B7E for ; Thu, 25 May 2023 21:40:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229944AbjEYVki (ORCPT ); Thu, 25 May 2023 17:40:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233560AbjEYVke (ORCPT ); Thu, 25 May 2023 17:40:34 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 538CD99 for ; Thu, 25 May 2023 14:40:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685050833; x=1716586833; h=subject:from:to:cc:date:message-id:mime-version: content-transfer-encoding; bh=bOpdYX6qCACVzsTl+M7OWZ/zO40ZppVDQsYXBw1pJO4=; b=LQTnqMZ3fFvQkrAyP4WlW807sJEp1Z7r2tBkq8BfFCUl4jXeiMMtlp02 NQUqSl2N2NZNFi8ORwfitEIAEUX3zRC62IfE/DvzHY3SBzdy6IPxMPVsM GU2MqnE9Ql1mNXEe5q7YSgYL3TRxrSq/NCAtw23Ns7bUMwZ2LAHktCyxz eY5Bb9wb1Zy1DS+0xm1BNJeyE/jnZivUuk3WMDJTZQAXBV3IOGkZ3bp6W ShfpdaSFh+nNdHZWq6I6ZyKV3RtuJwdiQZmnO3jAYDAUTDoQuYhNolUMQ 2X4b5ep7ZC0CItmR9GIER7whJkpCR5pDiG3lsMXFOYoS1yjFvpaBxihMc w==; X-IronPort-AV: E=McAfee;i="6600,9927,10721"; a="351544741" X-IronPort-AV: E=Sophos;i="6.00,192,1681196400"; d="scan'208";a="351544741" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 May 2023 14:40:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10721"; a="879297327" X-IronPort-AV: E=Sophos;i="6.00,192,1681196400"; d="scan'208";a="879297327" Received: from djiang5-mobl3.amr.corp.intel.com (HELO [192.168.1.177]) ([10.212.85.172]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 May 2023 14:40:32 -0700 Subject: [ndctl PATCH v2 0/3] ndctl: Add support of QoS Throttling Group (QTG) id for CXL CLI v2: From: Dave Jiang To: vishal.l.verma@intel.com Cc: linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev Date: Thu, 25 May 2023 14:40:31 -0700 Message-ID: <168505076089.2768411.10498775803334230215.stgit@djiang5-mobl3> User-Agent: StGit/1.5 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org - Updated against changed kernel sysfs attributes. - See individual commit logs for detailed changes. The series adds support for the kernel enabling [1] of QoS Throttling Group (QTG) id. The kernel exports a QTG id for the root decoders (CFMWS) and as well as for the CXL memory devices. The QTG id exported for a device is calculated by the driver during device probe. Currently one or more QTG ids are exported for the volatile partition and another for the persistent partition. In the future QTG id(s) will be exported for DCD regions. Display of QTG id is through the CXL CLI list command as qos_class. A QTG id check as also been added for region creation. A warning is emitted when the QTG id of a memory range of a CXL memory device being included in the CXL region assembly does not match the QTG id of the root decoder. Options are available to suppress the warning or to fail the region creation. This enabling provides a guidance on flagging memory ranges being used is not optimal for performance for the CXL region to be formed. [1]: https://lore.kernel.org/linux-cxl/168451588868.3470703.3527256859632103687.stgit@djiang5-mobl3/T/#t --- Dave Jiang (3): ndctl: cxl: Add QoS class retrieval for the root decoder ndctl: cxl: Add QoS class support for the memory device ndctl: cxl: add QoS class check for CXL region creation Documentation/cxl/cxl-create-region.txt | 9 ++++ cxl/filter.h | 4 ++ cxl/json.c | 46 +++++++++++++++++- cxl/lib/libcxl.c | 64 +++++++++++++++++++++++++ cxl/lib/libcxl.sym | 6 +++ cxl/lib/private.h | 3 ++ cxl/libcxl.h | 10 ++++ cxl/list.c | 1 + cxl/region.c | 63 +++++++++++++++++++++++- util/json.h | 1 + 10 files changed, 205 insertions(+), 2 deletions(-) -- Signature