Re: [PATCH] x86/uaccess: optimize copy_user_enhanced_fast_string for short string

2017-06-29 Thread Linus Torvalds
Looks ok to me, so Ack, fwiw. I've have long hoped that Intel would actually fix their microcode overhead issue so that we could get rid of all this and just inline "rep movsb", but that hasn't been happening, so this patch looks fine. Side niote: I suspect the copy_user_generic_string() might as

[PATCH] x86/uaccess: optimize copy_user_enhanced_fast_string for short string

2017-06-29 Thread Paolo Abeni
According to the Intel datasheet, the rep movsb instruction exposes a relevant setup cost - 50 ticks - which affect badly short string copy operation. This change tries to avoid such cost calling the explicit loop available in the unrolled code for string shorter than 64 bytes. Such value has been