Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1382532ybh; Thu, 16 Jul 2020 10:31:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRuMlOWYZUwWGP2AsJt1GmX+nAV2Sol1Q3TAQtYHoGKqPX3GVYRQaNm6mxEsCAimIc9rg9 X-Received: by 2002:a17:906:4acc:: with SMTP id u12mr2333313ejt.358.1594920669148; Thu, 16 Jul 2020 10:31:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594920669; cv=none; d=google.com; s=arc-20160816; b=Bhx7ErulZAVJeLGD9oLJAzXJdwbcx/P5NKVsnR0nvXbqzcde4+5NnfIGwjt1YKzh3a fwoBOvcnLq1v6XWqn6s5akfvK5E9+eSxmdjM5lSExez3n9zbnAwTN5YZrFx+Zxxaol03 xQe0038SI4cFMp0I/IAC90gy782LwceG97hjzHemco7u84hIYby5jLWoAnX3mE2/kH2e WfJe4IVFsSHKWdW9pA2cQe0wAb0Rrd0f43auav+ilfpDa1CkHT7WcH2LwCwzGNToQ7cY YtUyCpNqC3LW9M0g2tZ8w/RIPxbRA7uvXOMyaPhEeMvwCfAogJ1My3ID4VyONt4OhYf8 cjKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZkLmXaQi9ugUcPGIWCmMgZ6iQMhcjVJkBMoXeOQwmyM=; b=m8zfaE1OZgRwPrenUtICCjF/svYm/IU8QNzwEZ5057n90LfsJWXYho+AgQr3Hrl7ws LKfZPiiqOQnZ27k4lDReXJRJgo71xXk+Kq8b777JXrWe5Rxp4EKtXtUJByO+qytephcu cwHzMLl0yB4XxerFo2rlaMeU3dRlmW6VgOe1V3XIbTiyMGGyCJSfEiz89lmFm8NgR1nq IxrAhfJgWokfPz2JGKekw0EWFgSc++1OrCSqV00690rwFKKqIbo/8kIlNwwdEFXif2zi KyaW8OZO2HWM4w7gHxf2QjoTmi5y0orZvNG8Nvf2joF8nt16e0AhQ17ofOJEcPx/4kOt 2lnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=RUBQfUgm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t28si3692740edc.97.2020.07.16.10.30.46; Thu, 16 Jul 2020 10:31:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=RUBQfUgm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729327AbgGPR3o (ORCPT + 99 others); Thu, 16 Jul 2020 13:29:44 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:60320 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726986AbgGPR3n (ORCPT ); Thu, 16 Jul 2020 13:29:43 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06GHMCCs108201; Thu, 16 Jul 2020 17:29:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to; s=corp-2020-01-29; bh=ZkLmXaQi9ugUcPGIWCmMgZ6iQMhcjVJkBMoXeOQwmyM=; b=RUBQfUgmGKChbgMYUmEvIcVT3+aJZYhwqkHWUKpO5rPrQkilijpWXETaWT4LmQ96BF7y P/oKa+3s6SFsI7CYFSlnZRD/x9AVlbiugk+uKy4Ry8kt7WtR+aQai9iIO4jC7DtJl+nn HLXPSAGelTdcbvi3LLlduGK4hxHTOObWVHxs731Sz64ppe9UaW/V53mFmddjReVQ0R1n akCk8xVzPJF9UjkAW9t0vyjd8Vo5koDzZa6q+UkTP+WAY1yXOTVPZRnX8ROBN0CM41iU PDOgoL08ydnGbrdA5iPFyB/T1MKQp/O+1FRVP1IhrnS2BRpSG1rilgv92WJoNmHfN0ON qg== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 3274urjv5v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 16 Jul 2020 17:29:37 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06GHHlFm071570; Thu, 16 Jul 2020 17:29:37 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3020.oracle.com with ESMTP id 32akr3qw0r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Jul 2020 17:29:36 +0000 Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 06GHTZVM019031; Thu, 16 Jul 2020 17:29:35 GMT Received: from paddy.uk.oracle.com (/10.175.173.87) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 16 Jul 2020 10:29:35 -0700 From: Joao Martins To: Dan Williams Cc: linux-nvdimm@lists.01.org, Vishal Verma , Dave Jiang , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Jason Zeng Subject: [PATCH v1 0/4] device-dax: Further improvements to subdivision Date: Thu, 16 Jul 2020 18:29:09 +0100 Message-Id: <20200716172913.19658-1-joao.m.martins@oracle.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <159457116473.754248.7879464730875147365.stgit@dwillia2-desk3.amr.corp.intel.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9684 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 suspectscore=0 mlxlogscore=999 spamscore=0 mlxscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007160126 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9684 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 impostorscore=0 suspectscore=0 phishscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 priorityscore=1501 adultscore=0 bulkscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007160126 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey, Here's a small set of improvements that I was hoping you would consider as part of your Soft-Reserved series[0]; should you think they make sense. It does the following: Patch 1-2: Add an align sysfs attribute, as opposed to being limited to 2M. This brings parity to static dax regions, which support 1G. Patch 3. Add a module parameter to hmem, to initialize the region as idle with full available_size for child devices. When the region is gonna be partiotined by default and assigned to guests, doesn't help to initialize the region. Also if the majority of the region starts non-idle and it's a region which memmap is bigger than System-Ram, then there not be enough space for the device to be probed successfully. Patch 4: Add an sysfs attribute for range allocation. It is a single entry where you pass a range - and where the ordering plus range length designate the page_offset. It is meant for recreate the same mappings after kexec (retaining the GPA->HPA association), but could also allow application to implement their own allocation strategy. I will submit a separate daxctl counterpart shortly, to help visualize its use. [0] https://lore.kernel.org/linux-mm/159457116473.754248.7879464730875147365.stgit@dwillia2-desk3.amr.corp.intel.com Joao Joao Martins (4): device-dax: Make align a per-device property device-dax: Add an 'align' attribute dax/hmem: Introduce dax_hmem.region_idle parameter device-dax: Add a range mapping allocation attribute drivers/dax/bus.c | 166 +++++++++++++++++++++++++++++++++++--- drivers/dax/dax-private.h | 1 + drivers/dax/device.c | 35 ++++---- drivers/dax/hmem/hmem.c | 5 +- 4 files changed, 177 insertions(+), 30 deletions(-) -- 2.17.1