Is clflush or clflushopt atomic when system crash?

170 views
Skip to first unread message

dz814...@gmail.com

unread,
Jan 6, 2021, 4:23:42 AM1/6/21
to pmem
Hello,

According to Hadi Brais’ anwser on StackOverflow,it is atomic with WB stores.
Is there any evidence such as official documents that can be cited by the paper?

Thanks,  
dang 

Steve Scargall

unread,
Jan 6, 2021, 11:30:32 AM1/6/21
to pmem
Hi Dang,

In a system crash or power-outage scenario, there's no opportunity for your app to call clflush/clflushopt since all operations are halted other than the critical ones needed to handle the event. You appear to be asking "What is my persistence domain?", "How does it work?", and "As a developer, what do I need to do from the app?". The last part of Hadi's response in the StackOverflow thread has a link to the article that describes what ADR and eADR persistence domains are, how they work, and what this means for applications (or developers). 

"These guarantees apply to Asynchronous DRAM Refresh (ADR) platforms and Enhanced Asynchronous DRAM Refresh (eADR) platforms. (On eADR, the cache hierarchy is in the persistence domain. See: Build Persistent Memory Applications with Reliability Availability and Serviceability.) "

To summarise that article, an ADR persistence domain contains the memory controller write pending queue (WPQ) and PMem write buffers. It does not contain the CPU caches, which is why the app has the responsibility to call clflush/clflushopt and SFENCE. However on platforms that provide eADR, the CPU caches are included in the persistence domain, so the app no longer needs to call clflush/clflushopt, but it should still call SFENCE when appropriate. If you use the Persistent Memory Development Kit, the libraries support both ADR and eADR platforms and 'do the right thing' regarding flushing and fencing. As a developer using the higher level PMDK libraries (eg: libpmemobj), you don't need to worry about the hardware, you focus on your app. Cascade Lake platforms only support ADR, which is a mandatory requirement. Next-generation Ice Lake platforms will have the option to provide eADR or fall back to ADR if eADR isn't supported or implemented. eADR support is a platform specific feature and not all platforms will provide eADR support by default, so check with your server OEM before purchase. 

There's more in-depth information in the "Programming Persistent Memory" book than you can download for free, or buy a printed copy.

HTH
    Steve

  

 




Steve Scargall

unread,
Jan 6, 2021, 11:33:26 AM1/6/21
to pmem
I sent the response before including a link to Andy Rudoff's eADR discussion video -  https://www.intel.com/content/www/us/en/events/memory-and-storage.html?videoId=6215533858001. There has been some eADR discussions on this forum in recent weeks, so check those out too. 

dz814...@gmail.com

unread,
Jan 7, 2021, 1:40:49 AM1/7/21
to pmem

Helpful video, thank you!
Reply all
Reply to author
Forward
0 new messages