Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp601502pxa; Fri, 21 Aug 2020 15:58:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHflHKjU1isDc2OB4RmyaZ5BxcLCnqQihzUR/WI2uQ2zi1hdqszYvRGsR69bj6IDgbeO7F X-Received: by 2002:a17:906:3c02:: with SMTP id h2mr5175773ejg.437.1598050693140; Fri, 21 Aug 2020 15:58:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598050693; cv=none; d=google.com; s=arc-20160816; b=B80btjBBAaLTjfcdeeqdFTdulV+gWbJHUEgzAheMNmyVCD6mpwmnOIMaRk101yYxcO GlnGhJeD3+EA6WooIix7ObTmx+ag8c++oAdejflxKx3/L/tx6xcA945HTG9QEYeiB4JB exD111FxxP3ytY4kLigqp4/pSdbdhuRhF1BV4USSTjKZCJXR5Xdpbmrg3874QQLrG16w JAvEvjoF733gvLMlzibI6z0voUIX2v26bawpy8geIHBbiLQSfiIWpyHrRPzoXlnO2HZC xIwG9/qzWbhrz6R0jpLB6I8OZiA5OA2OwKjVVWCA+0vFGvB2yGb3ip8kchcPR1SgBRwH Xa8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=ix3WcVeZ/zcum0eJLSSgtt7fMvWxGqHMOeMpai/lHlc=; b=EQttyqKB+Qr5DBd8wf4N4iTiYVoIytSPHHOM8ZUKO6XToH6PR9yZFSfCXPCWgrIbYw SVyZRUx2maWlpwKy/bH31RUWq5AQH68QcWMPK737uJieeUwyDLFQTL8Yktrc55qyylTa WyUFGGn0YqnvnBg6hBiDnqzXQLozv+A2bq044tXPtm/M5UnjtY36tXGrnWYzJbXFtdOy 0u3iXoSKoJo4I1aHmwuMxwZEjey/WL/lcG6Wj71uAaq3wQ4AYlrPXm8K7zbgu9GL4xRr O60YiPepIS23IUCtZ+poRyFZfEYa+YRhZSEery2SQCqNhLxhjPJQTNCwBoT6aG9ukNOU mA/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iI4dJvXr; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m21si2177570edr.155.2020.08.21.15.57.49; Fri, 21 Aug 2020 15:58:13 -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=@kernel.org header.s=default header.b=iI4dJvXr; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726820AbgHUW4v (ORCPT + 99 others); Fri, 21 Aug 2020 18:56:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:48472 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726719AbgHUW4v (ORCPT ); Fri, 21 Aug 2020 18:56:51 -0400 Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 452372067C; Fri, 21 Aug 2020 22:56:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598050610; bh=ZrUsTOSSrUKu+XmJ3n3QrX2IzU2U3VsMZK0kOK4GMiE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iI4dJvXrsyw1+Tk8OEZKoXVwWx2kqLp0ly8GxASNosQKHAXDZv5hwcn5CC134bPNF caEROIqNlU8S+OxwkzchiFzFM3PRmD56ol/2Kerc6cXsp7ApDyw1xvfhmsSsve7A27 J1H7gbEkUDr4MCZZrQPSaW1dzJPF0DqbhJe8baJc= Date: Fri, 21 Aug 2020 15:56:49 -0700 From: Andrew Morton To: Dan Williams Cc: Vishal Verma , peterz@infradead.org, dave.hansen@linux.intel.com, ard.biesheuvel@linaro.org, linux-mm@kvack.org, linux-nvdimm@lists.01.org, joao.m.martins@oracle.com, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH v4 15/23] device-dax: Add resize support Message-Id: <20200821155649.6a9fe5eb22a013833f94427c@linux-foundation.org> In-Reply-To: <159643102625.4062302.7431838945566033852.stgit@dwillia2-desk3.amr.corp.intel.com> References: <159643094279.4062302.17779410714418721328.stgit@dwillia2-desk3.amr.corp.intel.com> <159643102625.4062302.7431838945566033852.stgit@dwillia2-desk3.amr.corp.intel.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 02 Aug 2020 22:03:46 -0700 Dan Williams wrote: > Make the device-dax 'size' attribute writable to allow capacity to be > split between multiple instances in a region. The intended consumers of > this capability are users that want to split a scarce memory resource > between device-dax and System-RAM access, or users that want to have > multiple security domains for a large region. > > By default the hmem instance provider allocates an entire region to the > first instance. The process of creating a new instance (assuming a > region-id of 0) is find the region and trigger the 'create' attribute > which yields an empty instance to configure. For example: > > cd /sys/bus/dax/devices > echo dax0.0 > dax0.0/driver/unbind > echo $new_size > dax0.0/size > echo 1 > $(readlink -f dax0.0)../dax_region/create > seed=$(cat $(readlink -f dax0.0)../dax_region/seed) > echo $new_size > $seed/size > echo dax0.0 > ../drivers/{device_dax,kmem}/bind > echo dax0.1 > ../drivers/{device_dax,kmem}/bind > > Instances can be destroyed by: > > echo $device > $(readlink -f $device)../dax_region/delete This userspace interface doesn't seem to be documented anywhere, so there's nothing to update for this patch :(