On Tue, Dec 15, 2015 at 08:25:37PM +, Elliott, Robert (Persistent Memory)
wrote:
> This isn't exactly what you're looking for, but here is
> an example of fio doing reads from pmem devices (reading
> from NVDIMMs, writing to DIMMs) with various transfer
> sizes.
... and "fio" is?
> At 256
On Tue, Dec 15, 2015 at 08:25:37PM +, Elliott, Robert (Persistent Memory)
wrote:
> This isn't exactly what you're looking for, but here is
> an example of fio doing reads from pmem devices (reading
> from NVDIMMs, writing to DIMMs) with various transfer
> sizes.
... and "fio" is?
> At 256
L
> ; linux-kernel@vger.kernel.org; Linux MM m...@kvack.org>; Andy Lutomirski ; Andrew Morton
> ; Ingo Molnar
> Subject: Re: [PATCHV2 3/3] x86, ras: Add mcsafe_memcpy() function to
> recover from machine checks
>
> On Tue, Dec 15, 2015 at 07:19:58PM +, Elliott, Robert (Persiste
On Tue, Dec 15, 2015 at 07:19:58PM +, Elliott, Robert (Persistent Memory)
wrote:
...
> Due to the historic long latency of storage devices,
> applications don't re-read from storage again; they
> save the results.
> So, the streaming-load instructions are beneficial:
That's the theory...
ger.kernel.org; Linux MM ; Andy Lutomirski
> ; Andrew Morton ; Ingo Molnar
>
> Subject: Re: [PATCHV2 3/3] x86, ras: Add mcsafe_memcpy() function to
> recover from machine checks
>
> On Tue, Dec 15, 2015 at 10:35:49AM -0800, Dan Williams wrote:
> > Correction we have
>> ... and the non-temporal version is the optimal one even though we're
>> defaulting to copy_user_enhanced_fast_string for memcpy on modern Intel
>> CPUs...?
My current generation cpu has a bit of an issue with recovering from a
machine check in a "rep mov" ... so I'm working with a version of
On Tue, Dec 15, 2015 at 5:11 AM, Borislav Petkov wrote:
> On Thu, Dec 10, 2015 at 04:21:50PM -0800, Tony Luck wrote:
>> Using __copy_user_nocache() as inspiration create a memory copy
>> routine for use by kernel code with annotations to allow for
>> recovery from machine checks.
>>
>> Notes:
>>
On Tue, Dec 15, 2015 at 10:35:49AM -0800, Dan Williams wrote:
> Correction we have MOVNTDQA, but that requires saving the fpu state
> and marking the memory as WC, i.e. probably not worth it.
Not really. Last time I tried an SSE3 memcpy in the kernel like glibc
does, it wasn't worth it. The
On Tue, Dec 15, 2015 at 9:53 AM, Luck, Tony wrote:
>>> ... and the non-temporal version is the optimal one even though we're
>>> defaulting to copy_user_enhanced_fast_string for memcpy on modern Intel
>>> CPUs...?
>
> My current generation cpu has a bit of an issue with recovering from a
>
On Tue, Dec 15, 2015 at 10:27 AM, Dan Williams wrote:
> On Tue, Dec 15, 2015 at 9:53 AM, Luck, Tony wrote:
... and the non-temporal version is the optimal one even though we're
defaulting to copy_user_enhanced_fast_string for memcpy on modern Intel
CPUs...?
>>
>> My current
On Tue, Dec 15, 2015 at 05:53:31PM +, Luck, Tony wrote:
> My current generation cpu has a bit of an issue with recovering from a
> machine check in a "rep mov" ... so I'm working with a version of memcpy
> that unrolls into individual mov instructions for now.
Ah.
> I can drop the "nti" from
On Thu, Dec 10, 2015 at 04:21:50PM -0800, Tony Luck wrote:
> Using __copy_user_nocache() as inspiration create a memory copy
> routine for use by kernel code with annotations to allow for
> recovery from machine checks.
>
> Notes:
> 1) Unlike the original we make no attempt to copy all the bytes
On Tue, Dec 15, 2015 at 9:53 AM, Luck, Tony wrote:
>>> ... and the non-temporal version is the optimal one even though we're
>>> defaulting to copy_user_enhanced_fast_string for memcpy on modern Intel
>>> CPUs...?
>
> My current generation cpu has a bit of an issue with
On Tue, Dec 15, 2015 at 10:35:49AM -0800, Dan Williams wrote:
> Correction we have MOVNTDQA, but that requires saving the fpu state
> and marking the memory as WC, i.e. probably not worth it.
Not really. Last time I tried an SSE3 memcpy in the kernel like glibc
does, it wasn't worth it. The
m nvd...@ml01.01.org>; X86 ML <x...@kernel.org>; linux-
> ker...@vger.kernel.org; Linux MM <linux...@kvack.org>; Andy Lutomirski
> <l...@kernel.org>; Andrew Morton <a...@linux-foundation.org>; Ingo Molnar
> <mi...@kernel.org>
> Subject: Re: [PATCHV2 3
On Tue, Dec 15, 2015 at 05:53:31PM +, Luck, Tony wrote:
> My current generation cpu has a bit of an issue with recovering from a
> machine check in a "rep mov" ... so I'm working with a version of memcpy
> that unrolls into individual mov instructions for now.
Ah.
> I can drop the "nti" from
On Tue, Dec 15, 2015 at 10:27 AM, Dan Williams wrote:
> On Tue, Dec 15, 2015 at 9:53 AM, Luck, Tony wrote:
... and the non-temporal version is the optimal one even though we're
defaulting to copy_user_enhanced_fast_string for memcpy on
On Tue, Dec 15, 2015 at 5:11 AM, Borislav Petkov wrote:
> On Thu, Dec 10, 2015 at 04:21:50PM -0800, Tony Luck wrote:
>> Using __copy_user_nocache() as inspiration create a memory copy
>> routine for use by kernel code with annotations to allow for
>> recovery from machine checks.
On Tue, Dec 15, 2015 at 07:19:58PM +, Elliott, Robert (Persistent Memory)
wrote:
...
> Due to the historic long latency of storage devices,
> applications don't re-read from storage again; they
> save the results.
> So, the streaming-load instructions are beneficial:
That's the theory...
>> ... and the non-temporal version is the optimal one even though we're
>> defaulting to copy_user_enhanced_fast_string for memcpy on modern Intel
>> CPUs...?
My current generation cpu has a bit of an issue with recovering from a
machine check in a "rep mov" ... so I'm working with a version of
Molnar <mi...@kernel.org>
> Subject: Re: [PATCHV2 3/3] x86, ras: Add mcsafe_memcpy() function to
> recover from machine checks
>
> On Tue, Dec 15, 2015 at 07:19:58PM +, Elliott, Robert (Persistent
> Memory) wrote:
>
> ...
>
> > Due to the historic long latency
On Thu, Dec 10, 2015 at 04:21:50PM -0800, Tony Luck wrote:
> Using __copy_user_nocache() as inspiration create a memory copy
> routine for use by kernel code with annotations to allow for
> recovery from machine checks.
>
> Notes:
> 1) Unlike the original we make no attempt to copy all the bytes
On Mon, Dec 14, 2015 at 11:46 AM, Luck, Tony wrote:
> On Mon, Dec 14, 2015 at 09:36:25AM +0100, Ingo Molnar wrote:
>> > /* deal with it */
>> >
>> > That way the magic is isolated to the function that needs the magic.
>>
>> Seconded - this is the usual pattern we use in all assembly
On Mon, Dec 14, 2015 at 09:36:25AM +0100, Ingo Molnar wrote:
> > /* deal with it */
> >
> > That way the magic is isolated to the function that needs the magic.
>
> Seconded - this is the usual pattern we use in all assembly functions.
Ok - you want me to write some x86 assembly code (you
* Andy Lutomirski wrote:
> I still think it would be better if you get rid of BIT(63) and use a
> pair of landing pads, though. They could be as simple as:
>
> .Lpage_fault_goes_here:
> xorq %rax, %rax
> jmp .Lbad
>
> .Lmce_goes_here:
> /* set high bit of rax or whatever */
>
On Mon, Dec 14, 2015 at 09:36:25AM +0100, Ingo Molnar wrote:
> > /* deal with it */
> >
> > That way the magic is isolated to the function that needs the magic.
>
> Seconded - this is the usual pattern we use in all assembly functions.
Ok - you want me to write some x86 assembly code (you
On Mon, Dec 14, 2015 at 11:46 AM, Luck, Tony wrote:
> On Mon, Dec 14, 2015 at 09:36:25AM +0100, Ingo Molnar wrote:
>> > /* deal with it */
>> >
>> > That way the magic is isolated to the function that needs the magic.
>>
>> Seconded - this is the usual pattern we use in
* Andy Lutomirski wrote:
> I still think it would be better if you get rid of BIT(63) and use a
> pair of landing pads, though. They could be as simple as:
>
> .Lpage_fault_goes_here:
> xorq %rax, %rax
> jmp .Lbad
>
> .Lmce_goes_here:
> /* set high bit of rax
On Fri, Dec 11, 2015 at 2:45 PM, Luck, Tony wrote:
>>> But a machine check safe copy_from_user() would be useful
>>> current generation cpus that broadcast all the time.
>>
>> Fair enough.
>
> Thanks for spending the time to look at this. Coaxing me to re-write the
> tail of do_machine_check()
>> But a machine check safe copy_from_user() would be useful
>> current generation cpus that broadcast all the time.
>
> Fair enough.
Thanks for spending the time to look at this. Coaxing me to re-write the
tail of do_machine_check() has made that code much better. Too many
years of one patch on
On Fri, Dec 11, 2015 at 2:35 PM, Luck, Tony wrote:
>> Also, are there really PCOMMIT-capable CPUs that still forcibly
>> broadcast MCE? If, so, that's unfortunate.
>
> PCOMMIT and LMCE arrive together ... though BIOS is in the decision
> path to enable LMCE, so it is possible that some systems
> Also, are there really PCOMMIT-capable CPUs that still forcibly
> broadcast MCE? If, so, that's unfortunate.
PCOMMIT and LMCE arrive together ... though BIOS is in the decision
path to enable LMCE, so it is possible that some systems could still
broadcast if the BIOS writer decides to not
On Fri, Dec 11, 2015 at 2:20 PM, Dan Williams wrote:
> On Fri, Dec 11, 2015 at 2:17 PM, Luck, Tony wrote:
>>> Also, would it be more straightforward if the mcexception landing pad
>>> looked up the va -> pa mapping by itself? Or is that somehow not
>>> reliable?
>>
>> If we did get all the
On Fri, Dec 11, 2015 at 2:17 PM, Luck, Tony wrote:
>> Also, would it be more straightforward if the mcexception landing pad
>> looked up the va -> pa mapping by itself? Or is that somehow not
>> reliable?
>
> If we did get all the above right, then we could have
> target use virt_to_phys() to
> I'm missing something, though. The normal fixup_exception path
> doesn't touch rax at all. The memory_failure path does. But couldn't
> you distinguish them by just pointing the exception handlers at
> different landing pads?
Perhaps I'm just trying to take a short cut to avoid writing
some
On Fri, Dec 11, 2015 at 1:19 PM, Luck, Tony wrote:
>> I still don't get the BIT(63) thing. Can you explain it?
>
> It will be more obvious when I get around to writing copy_from_user().
>
> Then we will have a function that can take page faults if there are pages
> that are not present. If the
> I still don't get the BIT(63) thing. Can you explain it?
It will be more obvious when I get around to writing copy_from_user().
Then we will have a function that can take page faults if there are pages
that are not present. If the page faults can't be fixed we have a -EFAULT
condition. We
On Thu, Dec 10, 2015 at 4:21 PM, Tony Luck wrote:
> Using __copy_user_nocache() as inspiration create a memory copy
> routine for use by kernel code with annotations to allow for
> recovery from machine checks.
>
> Notes:
> 1) Unlike the original we make no attempt to copy all the bytes
>up
Using __copy_user_nocache() as inspiration create a memory copy
routine for use by kernel code with annotations to allow for
recovery from machine checks.
Notes:
1) Unlike the original we make no attempt to copy all the bytes
up to the faulting address. The original achieves that by
On Fri, Dec 11, 2015 at 1:19 PM, Luck, Tony wrote:
>> I still don't get the BIT(63) thing. Can you explain it?
>
> It will be more obvious when I get around to writing copy_from_user().
>
> Then we will have a function that can take page faults if there are pages
> that are
On Fri, Dec 11, 2015 at 2:17 PM, Luck, Tony wrote:
>> Also, would it be more straightforward if the mcexception landing pad
>> looked up the va -> pa mapping by itself? Or is that somehow not
>> reliable?
>
> If we did get all the above right, then we could have
> target use
> Also, are there really PCOMMIT-capable CPUs that still forcibly
> broadcast MCE? If, so, that's unfortunate.
PCOMMIT and LMCE arrive together ... though BIOS is in the decision
path to enable LMCE, so it is possible that some systems could still
broadcast if the BIOS writer decides to not
> I still don't get the BIT(63) thing. Can you explain it?
It will be more obvious when I get around to writing copy_from_user().
Then we will have a function that can take page faults if there are pages
that are not present. If the page faults can't be fixed we have a -EFAULT
condition. We
On Fri, Dec 11, 2015 at 2:45 PM, Luck, Tony wrote:
>>> But a machine check safe copy_from_user() would be useful
>>> current generation cpus that broadcast all the time.
>>
>> Fair enough.
>
> Thanks for spending the time to look at this. Coaxing me to re-write the
> tail of
> I'm missing something, though. The normal fixup_exception path
> doesn't touch rax at all. The memory_failure path does. But couldn't
> you distinguish them by just pointing the exception handlers at
> different landing pads?
Perhaps I'm just trying to take a short cut to avoid writing
some
On Fri, Dec 11, 2015 at 2:35 PM, Luck, Tony wrote:
>> Also, are there really PCOMMIT-capable CPUs that still forcibly
>> broadcast MCE? If, so, that's unfortunate.
>
> PCOMMIT and LMCE arrive together ... though BIOS is in the decision
> path to enable LMCE, so it is
>> But a machine check safe copy_from_user() would be useful
>> current generation cpus that broadcast all the time.
>
> Fair enough.
Thanks for spending the time to look at this. Coaxing me to re-write the
tail of do_machine_check() has made that code much better. Too many
years of one patch on
On Fri, Dec 11, 2015 at 2:20 PM, Dan Williams wrote:
> On Fri, Dec 11, 2015 at 2:17 PM, Luck, Tony wrote:
>>> Also, would it be more straightforward if the mcexception landing pad
>>> looked up the va -> pa mapping by itself? Or is that somehow not
Using __copy_user_nocache() as inspiration create a memory copy
routine for use by kernel code with annotations to allow for
recovery from machine checks.
Notes:
1) Unlike the original we make no attempt to copy all the bytes
up to the faulting address. The original achieves that by
On Thu, Dec 10, 2015 at 4:21 PM, Tony Luck wrote:
> Using __copy_user_nocache() as inspiration create a memory copy
> routine for use by kernel code with annotations to allow for
> recovery from machine checks.
>
> Notes:
> 1) Unlike the original we make no attempt to copy
50 matches
Mail list logo