Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1678218

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

From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH] x86/uaccess: optimize copy_user_enhanced_fast_string for short string
Date 2017-06-29 23:50 +0200
Message-ID <tXPu2-4Pd-1@gated-at.bofh.it> (permalink)
References <tVefg-7PJ-9@gated-at.bofh.it> <tXI9c-8h6-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 well use
the same logic too, rather than having a different cut-off (8 bytes)
to a worse implementation (rep movsb on architectures that don't mark
themselves with the enhanced string).

                  Linus

On Thu, Jun 29, 2017 at 6:55 AM, Paolo Abeni <pabeni@redhat.com> wrote:
> According to the Intel datasheet, the rep movsb instruction
> exposes a relevant setup cost - 50 ticks - which affect
> badly short string copy operation.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] x86/uaccess: use unrolled string copy for short strings Paolo Abeni <pabeni@redhat.com> - 2017-06-21 13:20 +0200
  Re: [PATCH] x86/uaccess: use unrolled string copy for short strings Kees Cook <keescook@chromium.org> - 2017-06-21 19:40 +0200
    Re: [PATCH] x86/uaccess: use unrolled string copy for short strings Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-06-22 17:00 +0200
  Re: [PATCH] x86/uaccess: use unrolled string copy for short strings Ingo Molnar <mingo@kernel.org> - 2017-06-22 10:50 +0200
    Re: [PATCH] x86/uaccess: use unrolled string copy for short strings Paolo Abeni <pabeni@redhat.com> - 2017-06-22 19:10 +0200
  Re: [PATCH] x86/uaccess: use unrolled string copy for short strings Linus Torvalds <torvalds@linux-foundation.org> - 2017-06-22 19:40 +0200
    Re: [PATCH] x86/uaccess: use unrolled string copy for short strings Paolo Abeni <pabeni@redhat.com> - 2017-06-22 20:00 +0200
    [PATCH] x86/uaccess: optimize copy_user_enhanced_fast_string for short string Paolo Abeni <pabeni@redhat.com> - 2017-06-29 16:00 +0200
      Re: [PATCH] x86/uaccess: optimize copy_user_enhanced_fast_string for  short string Linus Torvalds <torvalds@linux-foundation.org> - 2017-06-29 23:50 +0200
      [tip:x86/asm] x86/uaccess: Optimize  copy_user_enhanced_fast_string() for short strings tip-bot for Paolo Abeni <tipbot@zytor.com> - 2017-06-30 15:20 +0200

csiph-web