Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1579476lqz; Mon, 1 Apr 2024 10:19:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVf5Cg3AV6T+aDvtStsx76yPKEsjihuJPWx1CHffgQF+GRf9rm+Feb691ubzFz0TUFyLiP/dAkRXOEmpV3vTXOMvwcb8Q2kLh5gZ061+w== X-Google-Smtp-Source: AGHT+IHGpEAfryKnO4VXN3PPnFg6UVw4aVskbQoGtyeoxRcSyZgXVJiimrIrp3iawVgVAjS3gMIv X-Received: by 2002:a17:907:7f12:b0:a4e:516b:2fed with SMTP id qf18-20020a1709077f1200b00a4e516b2fedmr5812108ejc.49.1711991940043; Mon, 01 Apr 2024 10:19:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711991940; cv=pass; d=google.com; s=arc-20160816; b=1B1aU+6V9LNWHIUKtwR0+M7858dP89RgiOiaMpOfWfj8V51M/kqIs9ZtKHRCQQS+Wk SFRcuuOx5gvQzrKbbKw7l/mwIW8S9Ym6r0aU4JlTETQPr6J4zZaSpvK8n0FEXsUuqcGA NM9H/U0hhd9/4i+nTppQmB1HwJ//KmFJOHE8Hy9d650M7xRvkuG+L6UqN35BMy/m6q08 7bmF4XTrj9STLEcXzWd5zbLTVjz8dxJ/MoCuanJ+/ZF9axijtuUzGMc9Xi7iyXrzPTZy f+1CLg3vdTSVkAosxAXFq6yKJAxKRd+mw1KhtxkwhghEHGcAYmiLj/cE3pMbfnL23Fnc PObg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=qOK3DTb3r16hDiNmLlUBXxJnbNqZJ+zbBBf699Ao3W8=; fh=1ARVOQzWxOr+ItXO76UA1EOEwrWFWbSrKT9+vhR6TY0=; b=xWP6xs0zjt+vM52OKGaSLyiyEBtN2+AZAFRO7xVmJQKFhQmb4mZq6TdsEEaDuQiIFc tpdPmFChyv7gH/QSoVzjNhjkAS2zP35gblLG0WqdkXIByDtm1ByKV2x2a//z1WMAPPYK 0lMTUD9tYXj9+UpagvV1fogIGzOUm3P/8nj9tqH+zv6B/Xp3ObVnDFdHYa5K14dsSWF4 q8Fxk6U+M7lHh75fRqsRyRokZnlsIwGFaU76biKXBh1YVuMVRNg+EQPArZ8/otJF4NjI LBsenWO8/S+70ObZH4xvqoIfdtNT8kpXiWOa7odl68nXGy/I0fr/HHwe+lcuGsaHnUJX 0qJQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RjUZvz4s; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-126890-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126890-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h24-20020a170906399800b00a4e48739cbbsi2682872eje.1044.2024.04.01.10.18.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 10:19:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-126890-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RjUZvz4s; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-126890-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126890-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id C4BAE1F26AF2 for ; Mon, 1 Apr 2024 17:08:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A4B014AEFD; Mon, 1 Apr 2024 17:07:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="RjUZvz4s" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (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 C6B1847A64; Mon, 1 Apr 2024 17:07:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711991271; cv=none; b=c/oYOnLflWNdDRTmgEw7JLgCPIVrTqzpM1YvGsNGSfa6nIOT9G3rcYKW9jH98jN83hdqpZIDOzjf9dE/gazfy47d/qqHkM9rS4HAUxqs5SlcMgidocDe2jR4KS9Hti5tKv0FeZub3wKJIdcfjt3O7/b0Z/H0zkx8kOcU23BeL/E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711991271; c=relaxed/simple; bh=fAORdwCJ6cWoA/Nlrq+Jlb00Y+L+FLHUMh9x9qNLohk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=kPe16mLvPXgLTbmdbm+DFC9lgfFMcVPE+AjPzD5Ru2Ikq/35PA9wWTRAQAVebBR+DTIDuN3dPtD+qJLWi3RgvjvZjAFw6xpw1sih8UGqVv4epTBURX6576aK6/jbZaIVk6ABwqJSaeq0E9Z4zxvAKMSO0GzApUuNKT0DARaZ7LI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=RjUZvz4s; arc=none smtp.client-ip=192.198.163.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711991270; x=1743527270; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=fAORdwCJ6cWoA/Nlrq+Jlb00Y+L+FLHUMh9x9qNLohk=; b=RjUZvz4sH5PmKKx81UIg4Uq4aICyuwdOodB5s3ZHg6azDKKOMtVv504v LvGYPIBcvejnGQ21TzZGRIBt9UyWvVgRKk2EdR95hRwqlYYQj0pP1QqCM lVUL2VEMwDBry2E/5cG4wC6uq27zEFElgwS4kMc4MPzvcUARz9qsbPKcf k9aJB6/2fmoLdte6YSJVdqbSzIPfYSxUUHCz/GlAqgKNrq7+htVMxTeiH TwMQI+NElRO0HXT2CAF0wAPRkkrVS680N9j6bY2miA9u1d8uYfn5BKk13 1y5zqyAvjZJycMXxUyfx5wJS94NNebi9oExScKDQowr51W4C86x29RBZ6 Q==; X-CSE-ConnectionGUID: 68MB2Cm4QFWLB7APJ3EAVQ== X-CSE-MsgGUID: SgwJM+JhRYy6QEHsYMy7UQ== X-IronPort-AV: E=McAfee;i="6600,9927,11031"; a="7317773" X-IronPort-AV: E=Sophos;i="6.07,172,1708416000"; d="scan'208";a="7317773" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2024 10:07:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,172,1708416000"; d="scan'208";a="22257093" Received: from mthansen-mobl.amr.corp.intel.com (HELO [10.212.113.134]) ([10.212.113.134]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2024 10:07:48 -0700 Message-ID: <31b6d5c2-281c-4eee-ba8a-5344eda23041@intel.com> Date: Mon, 1 Apr 2024 10:07:48 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 21/26] dax/region: Prevent range mapping allocation on sparse regions Content-Language: en-US To: Ira Weiny , Fan Ni , Jonathan Cameron , Navneet Singh Cc: Dan Williams , Davidlohr Bueso , Alison Schofield , Vishal Verma , linux-btrfs@vger.kernel.org, linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240324-dcd-type2-upstream-v1-0-b7b00d623625@intel.com> <20240324-dcd-type2-upstream-v1-21-b7b00d623625@intel.com> From: Dave Jiang In-Reply-To: <20240324-dcd-type2-upstream-v1-21-b7b00d623625@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/24/24 4:18 PM, Ira Weiny wrote: > Sparse regions are not fully populated with memory and this complicates > range mapping of dax devices on those regions. There is no use case for > range mapping on sparse regions. > > Avoid the complication by prevent range mapping of dax devices on sparse > regions. > > Signed-off-by: Ira Weiny Reviewed-by: Dave Jiang > --- > drivers/dax/bus.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c > index bab19fc578d0..56dddaceeccb 100644 > --- a/drivers/dax/bus.c > +++ b/drivers/dax/bus.c > @@ -1452,6 +1452,8 @@ static umode_t dev_dax_visible(struct kobject *kobj, struct attribute *a, int n) > return 0; > if (a == &dev_attr_mapping.attr && is_static(dax_region)) > return 0; > + if (a == &dev_attr_mapping.attr && is_sparse(dax_region)) > + return 0; > if ((a == &dev_attr_align.attr || > a == &dev_attr_size.attr) && is_static(dax_region)) > return 0444; >