Received: by 2002:ab2:2441:0:b0:1f3:1f8c:d0c6 with SMTP id k1csp174931lqe; Thu, 4 Apr 2024 03:26:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWI89uqWV0t4nXjcdyOyR2pfF0bNCdvIFZlg7CD6KOB/L7QIjZLEvXnzqA/vHixGjf0E/jO1lCs5HyOrrW0GCHQc64mh3cYwSfHXpPY9g== X-Google-Smtp-Source: AGHT+IHpJFEmZcr3Ac7vtWjhaiC3ChBTY0P+Clgr8lit9HZyOeiHOq9KLWwScBYivmEOX84Zbhx8 X-Received: by 2002:ac8:7f12:0:b0:431:7c36:7f86 with SMTP id f18-20020ac87f12000000b004317c367f86mr2065467qtk.59.1712226406899; Thu, 04 Apr 2024 03:26:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712226406; cv=pass; d=google.com; s=arc-20160816; b=TZTc+qNnJrDj/1Im386Q4/6xK3gqTTap6RuupZuVxHhdwfYhFI9HYBN1zz6JA9Wfza Eu+IS05DjhiRBuC0tjxtPlbj73I0QoDR0Kw4FNQwxnHZvocp8pJfHG0Qdd3MpaVNex2P JaQ7UwaJg+ST1iJc4/E/Tz7uaHTLgWOMyIGxdhDwSFWT3+ZVqjkhUX0OCEwAYYY2ekx5 3DD0uHWB061K3JUriqw90+mxMdJZSwuQs2RXTu6LOrt9KTbNGjdK3Ut839DlpBt8jVuE OiWeqA0eWTybDLP2kaYesqB9nYd1VXACLsLFZxHPm4hjSKZ0weufrxXCjddUlXWc4Vav OoQA== 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=IWg8Gd9IvWE4/VISVx695hwBfTdV361Ip/8DezD8krU=; fh=oNisMWpEcvm2DtsgRWUV2Wser7pCk8sGpM8IY4kS9gA=; b=XcqyBACzO7TLE5PjpUnvHlQXzwr+xa9A0Zu2Iq+fLsPD/dDQntaPs0Lq2fcj8bPUYf ITyM2YhVwEKOfJlg05W9o3IvC4l98ZfSQLsX1sByiq7zxze5MDAsdI7VwEfbHTIRO6DE uBi0wMm9hath+lZHKP3m5qhXpoirdvbB93sgMVbopzYDfMwwS/x8ET/OmVqvSowQBXCB PgMnU/81Y2cHjC3MaUkNfHrLGusIh7uq2CzB9IQ6TYO8bzjQBVkgku3scEZdbuBidolm EE+UI6P2kH1UUYm3MW2EwiUGZkV8G1eASI5/5EI4kZfcZsqlM44SzWI4CvEyX6Txn0NR QpLg==; 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-131236-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131236-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id en15-20020a05622a540f00b00432e3714feesi9159008qtb.374.2024.04.04.03.26.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 03:26:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131236-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; 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-131236-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131236-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9251D1C22C0C for ; Thu, 4 Apr 2024 10:26:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2941B76413; Thu, 4 Apr 2024 10:26:35 +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 DFCAE76028; Thu, 4 Apr 2024 10:26:31 +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=1712226394; cv=none; b=d2Cq/pl0DQyqQwNihl+ljtl9+B/dTtq6AnSop/KGZzKDgaYMdLK1pXlIkQC/TL9TqCcenAnZhh226l05qJXG8dKFzB2P7MngK8+twdXC5S79qVDk2YpbnjZ5VdarxBKAJrRRFG2TRZFKGJkH7oGccqp7ewuu7A1zRQhqz2NoshU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712226394; c=relaxed/simple; bh=mp9N14PVOm0pDhIFYCwd2DzvxM12B5Bpbgg+kpgmT1w=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YrSYJEqjFhSuYw85zu6FzaaJ0IFT2IhUm2/fLWeSYlyoh4gID/mxp5biNhwz68XBkG1In5rOVBe5mz/aI/NCJMoYn15dO1N/5+KSGP8AUAFFgk1lIYpakOtJnFsrU1zeXz6+4NyD/T7yAdx4BuZs2ndN6YvWiQnG5jIu9wWxFf0= 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 4V9Hmz2h71z6HJqS; Thu, 4 Apr 2024 18:25:07 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 3E78C140C72; Thu, 4 Apr 2024 18:26:29 +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 11:26:28 +0100 Date: Thu, 4 Apr 2024 11:26:28 +0100 From: Jonathan Cameron To: CC: Dave Jiang , Fan Ni , "Navneet Singh" , Dan Williams , Davidlohr Bueso , Alison Schofield , Vishal Verma , , , Subject: Re: [PATCH 09/26] cxl/region: Add Dynamic Capacity CXL region support Message-ID: <20240404112628.0000633d@Huawei.com> In-Reply-To: <20240324-dcd-type2-upstream-v1-9-b7b00d623625@intel.com> References: <20240324-dcd-type2-upstream-v1-0-b7b00d623625@intel.com> <20240324-dcd-type2-upstream-v1-9-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: lhrpeml500004.china.huawei.com (7.191.163.9) To lhrpeml500005.china.huawei.com (7.191.163.240) On Sun, 24 Mar 2024 16:18:12 -0700 ira.weiny@intel.com wrote: > From: Navneet Singh > > CXL devices optionally support dynamic capacity. CXL Regions must be > configured correctly to access this capacity. Similar to ram and pmem > partitions, DC Regions, as they are called in CXL 3.1, represent > different partitions of the DPA space. > > Introduce the concept of a sparse DAX region. Add the create_dc_region > sysfs entry to create sparse DC DAX regions. Special case DC capable > regions to create a 0 sized seed DAX device to maintain backwards > compatibility with older software which needs a default DAX device to > hold the region reference. > > Flag sparse DAX regions to indicate 0 capacity available until such time > as DC capacity is added. > > Interleaving is deferred in this series. Add an early check. > > Signed-off-by: Navneet Singh > Co-developed-by: Ira Weiny > Signed-off-by: Ira Weiny With the -EBUSY others addressed LGTM. Fan's duplication comment might be something to tidy up later. Reviewed-by: Jonathan Cameron