From mboxrd@z Thu Jan 1 00:00:00 1970 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 5114F275113; Mon, 14 Apr 2025 15:40:54 +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=1744645256; cv=none; b=TbM1fpVSicFpG0Koljubr9MTwfCiZM4JxExc9iXeeIjdRIgQnEx0aLyZT3JW+VNg41bnT+rZeaD8CLc0O/SlCQjrhvk64SHb1hauaL4jPCsNGZUsJclVDnPN2E3okimJJPbrqeGwCI7nf9o0h1eJREmcxEBaV4d4as5mcIzAEmI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744645256; c=relaxed/simple; bh=BHBjCEgKT4Nx1YkwyLzlLRLVMoeQ65ICUzaepBIEOMA=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=AhbzfKazTTyuDM7++KD2Tb2LWIJbjoWpD5BpUpbcHsr3xNkh0ME8v2GElo+RxNnJGw/LsgWGaaPB4g8VH22qmzeWu2xnk+6nKQ7VMuCIzPNta0CCi+1+mPtf/835GWBQoArz/wX/WgHJRTpcasTgr09Wb2hlmNIU8nqASQ/SGKY= 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 4ZbrxR44qwz6K9gB; Mon, 14 Apr 2025 23:36:43 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id 6EE5014050C; Mon, 14 Apr 2025 23:40:52 +0800 (CST) Received: from localhost (10.203.177.66) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 14 Apr 2025 17:40:51 +0200 Date: Mon, 14 Apr 2025 16:40:50 +0100 From: Jonathan Cameron To: Ira Weiny CC: Dave Jiang , Fan Ni , "Dan Williams" , Davidlohr Bueso , Alison Schofield , Vishal Verma , , , Subject: Re: [PATCH v9 07/19] cxl/region: Add sparse DAX region support Message-ID: <20250414164050.00003d6c@huawei.com> In-Reply-To: <20250413-dcd-type2-upstream-v9-7-1d4911a0b365@intel.com> References: <20250413-dcd-type2-upstream-v9-0-1d4911a0b365@intel.com> <20250413-dcd-type2-upstream-v9-7-1d4911a0b365@intel.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-cxl@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: lhrpeml100004.china.huawei.com (7.191.162.219) To frapeml500008.china.huawei.com (7.182.85.71) On Sun, 13 Apr 2025 17:52:15 -0500 Ira Weiny wrote: > Dynamic Capacity CXL regions must allow memory to be added or removed > dynamically. In addition to the quantity of memory available the > location of the memory within a DC partition is dynamic based on the > extents offered by a device. CXL DAX regions must accommodate the > sparseness of this memory in the management of DAX regions and devices. > > Introduce the concept of a sparse DAX region. Introduce > create_dynamic_ram_a_region() sysfs entry to create such regions. > Special case dynamic capable regions to create a 0 sized seed DAX device > to maintain compatibility which requires a default DAX device to hold a > region reference. > > Indicate 0 byte available capacity until such time that capacity is > added. > > Sparse regions complicate the range mapping of dax devices. There is no > known use case for range mapping on sparse regions. Avoid the > complication by preventing range mapping of dax devices on sparse > regions. > > Interleaving is deferred for now. Add checks. > > Based on an original patch by Navneet Singh. > > Signed-off-by: Ira Weiny > I'm not that familiar with the DAX parts but looks fine to me. Reviewed-by: Jonathan Cameron