diff mbox series

[v2,2/3] docs/nvdimm: add description of alignment requirement of device dax

Message ID 20200415033538.43329-3-jingqi.liu@intel.com
State New
Headers show
Series fetch the alignment of device dax | expand

Commit Message

Liu, Jingqi April 15, 2020, 3:35 a.m. UTC
For device dax (e.g., /dev/dax0.0), the NUM of 'align=NUM' option
needs to match the alignment requirement of the device dax.
It must be larger than or equal to the 'align' of device dax.

Signed-off-by: Jingqi Liu <jingqi.liu@intel.com>
---
 docs/nvdimm.txt | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Joao Martins April 28, 2020, 4:22 p.m. UTC | #1
On 4/15/20 4:35 AM, Jingqi Liu wrote:
> For device dax (e.g., /dev/dax0.0), the NUM of 'align=NUM' option
> needs to match the alignment requirement of the device dax.
> It must be larger than or equal to the 'align' of device dax.
> 
> Signed-off-by: Jingqi Liu <jingqi.liu@intel.com>
> ---
>  docs/nvdimm.txt | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/docs/nvdimm.txt b/docs/nvdimm.txt
> index 362e99109e..3c7b6dab5f 100644
> --- a/docs/nvdimm.txt
> +++ b/docs/nvdimm.txt
> @@ -132,6 +132,15 @@ address to the page size (getpagesize(2)) by default. However, some
>  types of backends may require an alignment different than the page
>  size. In that case, QEMU v2.12.0 and later provide 'align' option to
>  memory-backend-file to allow users to specify the proper alignment.
> +For device dax (e.g., /dev/dax0.0), this alignment needs to match the
> +alignment requirement of the device dax. The NUM of 'align=NUM' option
> +must be larger than or equal to the 'align' of device dax.
> +We can use the following command to show the 'align' of device dax.
> +
> +    ndctl list -X
> +
> +In order to get the proper 'align' of device dax, you need to install
> +the library 'libdaxctl'.
>  
>  For example, device dax require the 2 MB alignment, so we can use
>  following QEMU command line options to use it (/dev/dax0.0) as the
> 

Given that this series introduces support for libdaxctl, perhaps suggesting in
the docs how you can also query the @align with daxctl tool? e.g.

"We can one of the following commands to show the 'align' of device dax:

     ndctl list -X
     daxctl list -R"

The unlikely reason being that users may only install daxctl-{,libs,devel} and
not ndctl-*. It also covers other users like ACPI HMAT/hmem which are not
instrumented with ndctl.

With that:

  Reviewed-by: Joao Martins <joao.m.martins@oracle.com>

	Joao
Liu, Jingqi April 29, 2020, 6:11 a.m. UTC | #2
On 4/29/2020 12:22 AM, Joao Martins wrote:
> On 4/15/20 4:35 AM, Jingqi Liu wrote:
>> For device dax (e.g., /dev/dax0.0), the NUM of 'align=NUM' option
>> needs to match the alignment requirement of the device dax.
>> It must be larger than or equal to the 'align' of device dax.
>>
>> Signed-off-by: Jingqi Liu <jingqi.liu@intel.com>
>> ---
>>   docs/nvdimm.txt | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/docs/nvdimm.txt b/docs/nvdimm.txt
>> index 362e99109e..3c7b6dab5f 100644
>> --- a/docs/nvdimm.txt
>> +++ b/docs/nvdimm.txt
>> @@ -132,6 +132,15 @@ address to the page size (getpagesize(2)) by default. However, some
>>   types of backends may require an alignment different than the page
>>   size. In that case, QEMU v2.12.0 and later provide 'align' option to
>>   memory-backend-file to allow users to specify the proper alignment.
>> +For device dax (e.g., /dev/dax0.0), this alignment needs to match the
>> +alignment requirement of the device dax. The NUM of 'align=NUM' option
>> +must be larger than or equal to the 'align' of device dax.
>> +We can use the following command to show the 'align' of device dax.
>> +
>> +    ndctl list -X
>> +
>> +In order to get the proper 'align' of device dax, you need to install
>> +the library 'libdaxctl'.
>>   
>>   For example, device dax require the 2 MB alignment, so we can use
>>   following QEMU command line options to use it (/dev/dax0.0) as the
>>
> Given that this series introduces support for libdaxctl, perhaps suggesting in
> the docs how you can also query the @align with daxctl tool? e.g.
>
> "We can one of the following commands to show the 'align' of device dax:
>
>       ndctl list -X
>       daxctl list -R"

Thanks for your comments.
I'll add "daxctl list -R" in this doc.

Jingqi

> The unlikely reason being that users may only install daxctl-{,libs,devel} and
> not ndctl-*. It also covers other users like ACPI HMAT/hmem which are not
> instrumented with ndctl.
>
> With that:
>
>    Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
>
> 	Joao

Thanks.
diff mbox series

Patch

diff --git a/docs/nvdimm.txt b/docs/nvdimm.txt
index 362e99109e..3c7b6dab5f 100644
--- a/docs/nvdimm.txt
+++ b/docs/nvdimm.txt
@@ -132,6 +132,15 @@  address to the page size (getpagesize(2)) by default. However, some
 types of backends may require an alignment different than the page
 size. In that case, QEMU v2.12.0 and later provide 'align' option to
 memory-backend-file to allow users to specify the proper alignment.
+For device dax (e.g., /dev/dax0.0), this alignment needs to match the
+alignment requirement of the device dax. The NUM of 'align=NUM' option
+must be larger than or equal to the 'align' of device dax.
+We can use the following command to show the 'align' of device dax.
+
+    ndctl list -X
+
+In order to get the proper 'align' of device dax, you need to install
+the library 'libdaxctl'.
 
 For example, device dax require the 2 MB alignment, so we can use
 following QEMU command line options to use it (/dev/dax0.0) as the