I'm not a huge fan of the 'to_pmem' suffix as it doesn't really describe
what the function does. It describes what the argument is.
My initial gut reaction is to:
1) rename to pmem_mem{cpy,move,set}_persist()
- hints at the call to pmem_persist() in each copy call
- seems consistent with _nodrain() naming
2) change the manual describing "the result has" to specifically mention
the destination parameter name.. maybe "len bytes at pmemdest have".
3) Replace the final WARNING sentence with a paragraph of clear
statements. I don't think there's much risk of people arbitrarily using
these in code that has nothing to do with pmem. But they might think
that they need to use it for the source range. So just call that out.
"These functions are only needed if the destination range is pmem. They
do not treat the source range any differently than the usual copying
functions. memcpy(), memmove(), or memset() should be used if only the
source is pmem to avoid slowing down writes to the destination with
unnecessary flushing."
Or something to that effect :).
- z