From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f69.google.com (mail-it0-f69.google.com [209.85.214.69]) by kanga.kvack.org (Postfix) with ESMTP id A4A946B002C for ; Fri, 9 Feb 2018 14:17:37 -0500 (EST) Received: by mail-it0-f69.google.com with SMTP id u4so8980768iti.2 for ; Fri, 09 Feb 2018 11:17:37 -0800 (PST) Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id d70sor1950595itd.148.2018.02.09.11.17.36 for (Google Transport Security); Fri, 09 Feb 2018 11:17:36 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20180209190226.lqh6twf7thfg52cq@suse.de> References: <1518168340-9392-1-git-send-email-joro@8bytes.org> <1518168340-9392-10-git-send-email-joro@8bytes.org> <20180209190226.lqh6twf7thfg52cq@suse.de> From: Linus Torvalds Date: Fri, 9 Feb 2018 11:17:35 -0800 Message-ID: Subject: Re: [PATCH 09/31] x86/entry/32: Leave the kernel via trampoline stack Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Joerg Roedel Cc: Joerg Roedel , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , the arch/x86 maintainers , Linux Kernel Mailing List , linux-mm , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , "Liguori, Anthony" , Daniel Gruss , Hugh Dickins , Kees Cook , Andrea Arcangeli , Waiman Long , Pavel Machek On Fri, Feb 9, 2018 at 11:02 AM, Joerg Roedel wrote: > > Okay, I used movsb because I remembered that being the recommendation > for the most efficient memcpy, and it safes me an instruction. But that > is probably only true on modern CPUs. Yeah, it's only true on the very latest uarchs, and even there it's not perfect for small copies. On the older machines that are relevant for 32-bit code, it's often tens of cycles just for the ucode overhead, I think, and "rep movsb" actually does things literally a byte at a time. Linus -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org