Received: by 2002:ab2:2441:0:b0:1f3:1f8c:d0c6 with SMTP id k1csp137133lqe; Thu, 4 Apr 2024 01:59:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWtCuXevzA4fELLbE/UWrYZQrYkQ9TCWoE/eLdtRBQj3hdKfqT5OXF/g9DXL80P9iaX9IvgVGjmpNQw3oQzPoCVXcSd5k6MI5x4t71z4Q== X-Google-Smtp-Source: AGHT+IH7Dd2ExZ9TX2EjNkkZGIqn8Aa3gEmWVLeQuVhsNxJj1sVXumQOhkPi4UbIHctQ6p+IK1/W X-Received: by 2002:a17:90a:c587:b0:2a2:775:9830 with SMTP id l7-20020a17090ac58700b002a207759830mr1965607pjt.11.1712221143863; Thu, 04 Apr 2024 01:59:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712221143; cv=pass; d=google.com; s=arc-20160816; b=NcRNikzP7X0u5SPe+FN2xUcFZm0Jp+XwOWUyDeJtzgXa9tRpKvjFjHBppMdGS61P6M 2Wrz+UsQ7byn3WUc79eqMLFug0DGWHl8ICVgHbSu+qcMID2akJc35InnlTKuSIO7J0A7 Rdifuy5sodE3pHVkoBWvFFxte2KrTf8Ys5RepsNWEy4EXO3E9LOdONaKCd4OvkRgq7lZ cLbFQ4tq0CZOO0f4M8qXCou3tXqS5ENkJdioZSmV5ZylWHMlNgYh4NF45lXC0tzsaCAc G8Qw4zklQ2ND2eVxXkDdJ0/kMuNWW0wTrDUrI/VXl90Alrtd2XhslZsxr4jl/NsAFmxh TWTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=ACpLmk9Oe+04oLukAm7A7pTDVlbhHWsvD5fE3lITTp8=; fh=mg6XbBDMjbqGwNcWOq2JhMCVxAI2IM0SLRSu8YMQAmI=; b=XpH9DDpZ7r4OnNO5URi2r1iXIBt1uIIvKp3ZdDXJqIqDD+iHKRGvrfP+HCR2fElK6Z jQppXlKk69N4BU8LxSgNnS8P/eZlwq9PEZFP/dYumA+JmHzKECP5HadguqPVfy1OPjlp BeZnOusXsbybQB23PVOzf9JzmCx6GVhHIZdb41mycwKyIqXDOw20oF9a7t6ia+3qx5jp 5KBBYQdg70dV50p/BnkUP0/e3WLiQnhYSwB9gJkgr811MheNYT72ArYXKE6VPmkLxfyk bTgm5Iooh+xRrJY5aPF3VaMYcVpnS1iDtSHYKsR5jj763S6XWXYPIj85B1ZPpU+BbVhC Bp6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-131122-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131122-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=huawei.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id bx20-20020a17090af49400b002a290022891si1228113pjb.162.2024.04.04.01.59.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 01:59:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131122-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-131122-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131122-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 8BF11B28570 for ; Thu, 4 Apr 2024 08:44:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6B50E71B30; Thu, 4 Apr 2024 08:44:30 +0000 (UTC) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C74E59B61; Thu, 4 Apr 2024 08:44:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712220269; cv=none; b=K4Sfhr9Ia/BV3u6fbDXZDyUvePikFIrRUiu9XHP0b5ErCnYPV04mWUBVBpGVUflj4szZfk3WaNTpw07hcE/bxT4GzVxMRQ+jdHXvmTVpR2PviQcGZ/Ok7t9xx22jtLwgCF7uQdMYeQwuL4tqN2VKEE+YWB1+WcXo+YANo80LZw8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712220269; c=relaxed/simple; bh=BcdZknaQF2gm2/CUy0K8n7HnhaH5F3abfzSXR1LizX0=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Nw3c6CvpMwDqUQjQeosMh8nSDKeNWGM+tVC2t3/qdbztBpTpxyi9L2rjcBHwfGJ7JFghz7O4E6R1TGzIl6Ur+p7pH4lZODJ7dbtIvxZA9wdpZKu0npYIW4zpxf7r4ES3B+smsz3RR37LPJ8u9hKCdSmjXNcRNPLGdEurk9/reRU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4V9FRN5kTQz6D92t; Thu, 4 Apr 2024 16:39:44 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id B5A8C140B35; Thu, 4 Apr 2024 16:44:23 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 4 Apr 2024 09:44:23 +0100 Date: Thu, 4 Apr 2024 09:44:22 +0100 From: Jonathan Cameron To: fan CC: Davidlohr Bueso , , Dave Jiang , Fan Ni , Navneet Singh , Dan Williams , "Alison Schofield" , Vishal Verma , , , Subject: Re: [PATCH 08/26] cxl/mem: Expose device dynamic capacity capabilities Message-ID: <20240404094422.00004a13@Huawei.com> In-Reply-To: References: <20240324-dcd-type2-upstream-v1-0-b7b00d623625@intel.com> <20240324-dcd-type2-upstream-v1-8-b7b00d623625@intel.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml100006.china.huawei.com (7.191.160.224) To lhrpeml500005.china.huawei.com (7.191.163.240) On Tue, 26 Mar 2024 11:30:38 -0700 fan wrote: > On Mon, Mar 25, 2024 at 04:40:16PM -0700, Davidlohr Bueso wrote: > > On Sun, 24 Mar 2024, ira.weiny@intel.com wrote: > > > > > +What: /sys/bus/cxl/devices/memX/dc/region_count > > > +Date: June, 2024 > > > +KernelVersion: v6.10 > > > +Contact: linux-cxl@vger.kernel.org > > > +Description: > > > + (RO) Number of Dynamic Capacity (DC) regions supported on the > > > + device. May be 0 if the device does not support Dynamic > > > + Capacity. > > > > If dcd is not supported then we should not have the dc/ directory > > altogether. > > > > Thanks, > > Davidlohr > > I also think so. However, I also noticed one thing (not DCD related). > Even for a PMEM device, for example, we have a ram directory under the > device directory. True, but it's new ABI so we don't have to copy and Dan's patch to allow for hiding static attribute directories has landed in the meantime. So I vote for hiding it. > > =================== > root@DT:~# cxl list > [ > { > "memdev":"mem0", > "pmem_size":536870912, > "serial":0, > "host":"0000:0d:00.0" > } > ] > root@DT:~# ls /sys/bus/cxl/devices/mem0/ > dc dev driver firmware firmware_version label_storage_size numa_node payload_max pmem pmem0 ram security serial subsystem trigger_poison_list uevent > root@DT:~# > =================== > > Fan >