[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFxp45B42SgaO9zqRgCRGqy=M4gQWWY92iG3SHkuEOSEJg@mail.gmail.com>
Date: Thu, 29 Jun 2017 14:40:53 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Paolo Abeni <pabeni@...hat.com>
Cc: "the arch/x86 maintainers" <x86@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Kees Cook <keescook@...omium.org>,
Hannes Frederic Sowa <hannes@...essinduktion.org>,
Alan Cox <gnomes@...rguk.ukuu.org.uk>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/uaccess: optimize copy_user_enhanced_fast_string for
short string
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@...hat.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.
Powered by blists - more mailing lists