Rukhsana Ansari <
ruk.a...@gmail.com> writes:
> Hi,
>
> I posted a query this morning on a related topic. Hadn't seen this, but
> apart from the configs below, is the following a valid config too:
> 1. Open pmem device (block device in "raw"mode) in direct io mode
> if ((fd = open(“/dev/pmem0”, O_RDWR | O_DIRECT))< 0) {
> perror(“open failed.”);
> exit(1);
>
> 2. mmap the device to ap addr space.
> mmapp = mmap(NULL,length,PROT_READ | PROT_WRITE, MAP_SHARED, fd, offset);
>
>
> 3.
> // Write to the device using NVML api
> pmem_memcpy_persist(mmap, buf, buf_length)
>
> I've tried the above and it works during normal operation.
> However, will this ensure persistence, during a AC power loss for a
> legacy pmem, type 12 NVDIMM (not an emulated one)
Today, Linux does not support DAX on the block device. If you need
>>>>>> can find a procedure for creating a Device DAX.
>>>>>>
>>>>>> Hope that helps.
>>>>>> Wojtek
>>>>>>
>>>>>>
>>>>>> On Tuesday, May 23, 2017 at 9:45:14 AM UTC+2,
fengyule...@gmail.com
>>>>>> wrote:
>>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> I'm playing with nvml library recently, and tried to run simple_copy