[RESEND 2/3] powerpc/memcpy: Add memcpy_mcsafe for pmem
Jeff Moyer
jmoyer at redhat.com
Fri Apr 6 06:40:26 AEST 2018
Nicholas Piggin <npiggin at gmail.com> writes:
> On Thu, 5 Apr 2018 15:53:07 +1000
> Balbir Singh <bsingharora at gmail.com> wrote:
>> I'm thinking about it, I wonder what "bytes remaining" mean in pmem context
>> in the context of a machine check exception. Also, do we want to be byte
>> accurate or cache-line accurate for the bytes remaining? The former is much
>> easier than the latter :)
>
> The ideal would be a linear measure of how much of your copy reached
> (or can reach) non-volatile storage with nothing further copied. You
> may have to allow for some relaxing of the semantics depending on
> what the architecture can support.
I think you've got that backwards. memcpy_mcsafe is used to copy *from*
persistent memory. The idea is to catch errors when reading pmem, not
writing to it.
> What's the problem with just counting bytes copied like usercopy --
> why is that harder than cacheline accuracy?
He said the former (i.e. bytes) is easier. So, I think you're on the
same page. :)
Cheers,
Jeff
More information about the Linuxppc-dev
mailing list