lkml.org 
[lkml]   [2020]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 0/2] Replace and improve "mcsafe" with copy_safe()
On Thu, Apr 30, 2020 at 12:50:40PM -0700, Linus Torvalds wrote:

I see your point about the namimg being important. I think Dan's
case is indeed "copy from pmem to user" where only options for faulting
are #MC on the source addresses, and #PF on the destination.

> The only *fundamental* access would likely be a single read/write
> operation, not a copy operation. Think "get_user()" instead of
> "copy_from_user()". Even there you get combinatorial explosions with
> access sizes, but you can often generate those automatically or with
> simple patterns, and then you can build up the copy functions from
> that if you really need to.

That's maybe very clean. But it looks like it would be hard to build
a high performance interface on top of that primitive. Remember that
for Dan's copy 99.999999999367673%[1] of copies will not hit a machine
check on the read from pmem.

Dan wants (whatever the function name) to get to a "REP MOVS" with an
exception table entry to handle the cases where there is a fault.

-Tony

[1] Likely several more '9's in there

\
 
 \ /
  Last update: 2020-04-30 22:28    [W:0.070 / U:2.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site