[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 3/3] nvdimm: Enable sync-dax device property for nvdimm
From: |
Eric Blake |
Subject: |
Re: [PATCH v4 3/3] nvdimm: Enable sync-dax device property for nvdimm |
Date: |
Mon, 3 May 2021 13:27:22 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
On 4/28/21 10:49 PM, Shivaprasad G Bhat wrote:
> The patch adds the 'sync-dax' property to the nvdimm device.
>
> When the sync-dax is 'direct' indicates the backend is synchronous DAX
> capable and no explicit flush requests are required. When the mode is
> set to 'writeback' it indicates the backend is not synhronous DAX
synchronous
> capable and explicit flushes to Hypervisor are required.
>
> On PPC where the flush requests from guest can be honoured by the qemu,
s/the qemu/qemu/
> the 'writeback' mode is supported and set as the default. The device
> tree property "hcall-flush-required" is added to the nvdimm node which
> makes the guest to issue H_SCM_FLUSH hcalls to request for flushes
s/to issue/issue/
s/request for/request/
> explicitly. This would be the default behaviour without sync-dax
> property set for the nvdimm device. For old pSeries machine, the
> default is 'unsafe'.
>
> For non-PPC platforms, the mode is set to 'unsafe' as the default.
>
> Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
> ---
> +++ b/qapi/common.json
> @@ -197,3 +197,23 @@
> { 'enum': 'GrabToggleKeys',
> 'data': [ 'ctrl-ctrl', 'alt-alt', 'shift-shift','meta-meta', 'scrolllock',
> 'ctrl-scrolllock' ] }
> +
> +##
> +# @NvdimmSyncModes:
> +#
> +# Indicates the mode of flush to be used to ensure persistence in case
> +# of power failures.
> +#
> +# @unsafe: This is to indicate, the data on the backend device not be
> +# consistent in power failure scenarios.
s/This is to indicate, the/This indicates that/
s/device not/device might not/
> +# @direct: This is to indicate the backend device supports synchronous DAX
> +# and no explicit flush requests from the guest is required.
This indicates the backend device supports synchronous DAX, and no
explicit flush requests from the guest are required.
> +# @writeback: To be used when the backend device doesn't support synchronous
> +# DAX. The hypervisor issues flushes to the disk when requested
> +# by the guest.
> +# Since: 6.0
6.1
> +#
> +##
> +{ 'enum': 'NvdimmSyncModes',
> + 'data': [ 'unsafe', 'writeback',
> + { 'name': 'direct', 'if': 'defined(CONFIG_LIBPMEM)' } ] }
>
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v4 3/3] nvdimm: Enable sync-dax device property for nvdimm,
Eric Blake <=