On 3/25/21 7:21 AM, David Gibson wrote:
On Wed, Mar 24, 2021 at 09:34:06AM +0530, Aneesh Kumar K.V wrote:
> On 3/24/21 8:37 AM, David Gibson wrote:
>> On Tue, Mar 23, 2021 at 09:47:38AM -0400, Shivaprasad G Bhat wrote:
>>> The patch adds support for the SCM flush hcall for the nvdimm devices.
>>> collects all the hcall states from 'completed'
list. The necessary
>>> nvdimm flush specific vmstate structures are added to the spapr
>>> machine vmstate.
>>> Signed-off-by: Shivaprasad G Bhat <sbhat(a)linux.ibm.com>
>> An overal question: surely the same issue must arise on x86 with
>> file-backed NVDIMMs. How do they handle this case?
> On x86 we have different ways nvdimm can be discovered. ACPI NFIT, e820 map
> and virtio_pmem. Among these virio_pmem always operated with synchronous dax
> disabled and both ACPI and e820 doesn't have the ability to differentiate
> support for synchronous dax.
Ok. And for the virtio-pmem case, how are the extra flushes actually
done on x86?
virtio-pmem device has virtqueue with virtio_pmem_flush() as the handler
which gets called for all flush requests from guest. virtio_pmem_flush() is
offloading the flush to thread pool with a worker doing fsync() and the
completion callback notifying the guest with response.
> With that I would expect users to use virtio_pmem when using
> backed NVDIMMS
So... should we prevent advertising an NVDIMM through ACPI or e820 if
it doesn't have sync-dax enabled?
Is it possible to have different defaults for sync-dax based on
The behaviour on x86 is sync-dax=on for nvdimms. So, it would be correct to
have the default as "on" for x86. For pseries - "off" for new
Looking at code, I didnt find much ways to achieve this. Can you suggest
what can be done ?