RFR: 8207851 JEP Draft: Support ByteBuffer mapped over non-volatile memory
Andrew Dinn
adinn at redhat.com
Wed Jul 25 11:44:38 UTC 2018
Round 2
-------
I have updated the JEP and uploaded a revised webrev in the light of
existing feedback
JEP JIRA: https://bugs.openjdk.java.net/browse/JDK-8207851
Formatted JEP: http://openjdk.java.net/jeps/8207851
New webrev: http://cr.openjdk.java.net/~adinn/pmem/webrev.02/
I would welcome any further comments (I guess I'd be happy to push this
as is but I find it hard to believe it does not require more work.
Someone must have something to add :-)
List of Changes
---------------
I have followed Alan's request:
- extending FileChannel.MapMode to add two new modes
READ_ONLY_PERISTENT and READ_WRITE_PERSISTENT
- retaining the single method FileChannel.map to handle the new modes
(i.e. dumping the idea of a separate map_peristent API)
- FileChannelImpl.map now handles the relevant XXX_PERSISTENT cases
(rather than delegating to an internal method)
I have followed Florian's advice:
corrected spelling and format of the JEP, incuding made a clearer
separation of description of API changes from implementation details
modified the conditional compilation conditions and associated
comments in FileChannelImpl.c to define MAP_SYNC and MAP_PRIVATE when
the OS does not do so
I have also brought the implementation of the pre-sync and post-sync
operations in line with the libpmem code:
On x86
pre-sync is a no-op
post-sync is an no-op if clflush is used for writeback
post-sync is an sfence if clflushopt or clwb is used for writeback
On AArch64
pre-sync is a no-op
post-sync is a dmb(ISH)
Finally, I have updated the JEP text to reflect all the above changes.
regards,
Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander
More information about the hotspot-compiler-dev
mailing list