From patchwork Thu Jul 16 17:29:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joao Martins X-Patchwork-Id: 11668129 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 74A161392 for ; Thu, 16 Jul 2020 17:29:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3D7C72067D for ; Thu, 16 Jul 2020 17:29:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="RUBQfUgm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3D7C72067D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1CB388D002E; Thu, 16 Jul 2020 13:29:42 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 17B828D0005; Thu, 16 Jul 2020 13:29:42 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 06B738D002E; Thu, 16 Jul 2020 13:29:42 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0238.hostedemail.com [216.40.44.238]) by kanga.kvack.org (Postfix) with ESMTP id E7A7D8D0005 for ; Thu, 16 Jul 2020 13:29:41 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 6A0B91F1B for ; Thu, 16 Jul 2020 17:29:41 +0000 (UTC) X-FDA: 77044626162.19.iron20_5215ad926f04 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id EF69A1AD1B1 for ; Thu, 16 Jul 2020 17:29:40 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,joao.m.martins@oracle.com,,RULES_HIT:30036:30054:30064:30070,0,RBL:156.151.31.86:@oracle.com:.lbl8.mailshell.net-62.18.0.100 64.10.201.10;04yg4djompnjx8bhga5tahhcb6zf4opo9sb4erqo5a6r5pkz7ge7ro8msg664mk.pjebhn15n1bc9sop6a61qxpr75r4j3o7pi7xufx53hzunyhuo44sfyfasde5ykh.q-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: iron20_5215ad926f04 X-Filterd-Recvd-Size: 5132 Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Thu, 16 Jul 2020 17:29:40 +0000 (UTC) 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 X-Rspamd-Queue-Id: EF69A1AD1B1 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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(-)