[RFC v2] non-temporal memcpy
Konstantin Ananyev
konstantin.ananyev at huawei.com
Fri Jul 29 14:13:52 CEST 2022
Sorry, missed that part.
>
> > Another question - who will do 'sfence' after the copying?
> > Would it be inside memcpy_nt (seems quite costly), or would
> > it be another API function for that: memcpy_nt_flush() or so?
>
> Outside. Only the developer knows when it is required, so it wouldn't make any sense to add the cost inside memcpy_nt().
>
> I don't think we should add a flush function; it would just be another name for an already existing function. Referring to the required
> operation in the memcpy_nt() function documentation should suffice.
>
Ok, but again wouldn't it be arch specific?
AFAIK for x86 it needs to boil down to sfence, for other architectures - I don't know.
If you think there already is some generic one (rte_wmb?) that would always produce
correct instructions - sure let's use it.
More information about the dev
mailing list