lkml.org 
[lkml]   [2020]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 15/23] device-dax: Add resize support
On Sun, 02 Aug 2020 22:03:46 -0700 Dan Williams <dan.j.williams@intel.com> 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 :(

\
 
 \ /
  Last update: 2020-08-22 00:57    [W:0.277 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site