Live data from Hacker News

Deprecating the PCOMMIT Instruction

software.intel.com

11–20 of 26 posts

Re: Deprecating the PCOMMIT Instruction

#11
post #7
post #6

Earlier quoted context omitted.

It was the instruction for interacting with XPoint DIMMs (I wouldn't call them SSDs but whatever), but now you just use CLWB instead.

Previously you would use CLWB, SFENCE, then PCOMMIT. Now you use CLWB, then SFENCE.

From the article, there was another SFENCE after PCOMMIT.

Re: Deprecating the PCOMMIT Instruction

#14
post #2

This is a nice improvement. Now instead of having sfence/pcommit/sfence to flush writes to nvram, you would use just an sfence to ensure ordering with subsequent stores (e.g. a store that publishes the written data.) Its analogous to fysnc() to ensure data reaches the disk in a way that survives power failure. This is like just treating all writes as fsynced and not needing to worry about fsync at all, like with O_DI…

Not exactly, you still need a cache flush if you want to ensure that your write is persistent.

Re: Deprecating the PCOMMIT Instruction

#18
It's very rare that an instruction gets removed; the few instances that I can think of are XBTS/IBTS on the very first stepping of the 386, and the CMPXCHG on early 486s that occupied the same opcode briefly. Do any CPUs have this instruction?

It looks like the encoding of PCOMMIT (+66 0F AE/7) is basically the same as CLFLUSH except with a +66 prefix, so if a CPU doesn't know about PCOMMIT it'll probably try to execute it as a CLFLUSH with an ignored prefix.

But hopefully this "deprecated" information stays around, if for nothing other than "archaeological" purposes:

http://www.os2museum.com/wp/curious-instructions/

Re: Deprecating the PCOMMIT Instruction

#20
post #16
post #15

Earlier quoted context omitted.

This isn't the kind of instruction a compiler would emit for regular code.

What would this be used for?

Kernel direct access to Xpoint and similar DIMMs. Potentially applications via mmap. You'd probably write a simple assembly function for it and invoke that from a language that can call assembly routines.

Obvious applications are filesystems and databases.

Post reply on HN