[PATCH v4 0/3] RISC-V: ifunced memcpy using new kernel hwprobe interface

Jeff Law jeffreyalaw@gmail.com
Thu Jul 6 22:20:40 GMT 2023



On 7/6/23 14:11, Palmer Dabbelt wrote:
> 
> Thanks.  Given that it has a meaningful performance increase on the 
> T-Head hardware it seems reasonable to take it for the next release.  I 
> don't remember if I've looked super closely at the implementation, I'll 
> do so before testing and merging it -- certainly not this week, though, 
> as the merge window will probably eat all my spare cycles.
> 
> The only issue on my end is the assembly memcpy routine, which we were 
> generally trying to avoid.  +Jeff, as IIUC the Ventana folks were 
> interested in memcpy on fast-misaligned systems.  Do you guys happen to 
> have one lying around for the C implementation?  It'd be nice to see if 
> we're getting any real performance benefit from the assembly.
It's just an assembly version from the VRULL team.  It's a fairly 
typical decision tree based on the amount of data being copied.  Each of 
the variants tries to avoid loops by unrolling them in a sensible way.

What's never been 100% clear to me is whether or not the full decision 
tree is actually that profitable in practice.

With that in mind, I wouldn't object to Evan's implementation.  It's a 
bit simplistic, but I'm OK with that until someone proves additional 
complexity is really needed.  And I suspect we'll be using "V" based 
copiers soon anyway.

  Jeff


More information about the Libc-alpha mailing list