Received: by 10.223.176.5 with SMTP id f5csp1037043wra; Fri, 9 Feb 2018 11:18:29 -0800 (PST) X-Google-Smtp-Source: AH8x224uVxQiC3p59gL+6qp1ZNjBjikOg3oP1FT347KD72QXLMh7gAtgWmzomnz+StIcZZPVCqtP X-Received: by 10.98.137.213 with SMTP id n82mr3847232pfk.175.1518203909596; Fri, 09 Feb 2018 11:18:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518203909; cv=none; d=google.com; s=arc-20160816; b=cPnktM2amWQZ+3S/+F2AIr8dMYNNZinDYpyoaLI64hEBOpOI6nvzMD6rrSj7q+wdne e01Lx7JuN/sckGzZwHt6Vq5T3TJ7HerQIcW/UP/4h2DG8Y2Szbvi74WUa47odbyFn5OU J9e0TtiIck04DdkQPizZVjfe/zYj2i1MqEwial5Zi3U5uUYGRQ8FmXrv/nsSd+Iu8/Ws r5TXCBgF2O6/zvzq03KEhBbzZb4xGykpKjOGh8tyQufEgRqcMqs2Mcn0MHI7kO8vk9m2 6jlLpW26dszuHj2yf8k1nEJazuhdJjnTZjsV+bFozEtOrQk+OL0XMU36aJl1m4IAHCsH 2qqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=I/arvUcUKIlpe1kgARr0ggMZ4cFI3JvQrAPM/Y1Yd6A=; b=TbQrw7Sj32xBJvCi/gwYp770EmyNKHArvLF0C1qqZaIf+KMCQPaN88oNYY+GSGMMIf WcLXDpjRB/r/5txFHdcfM/VAq4CNr/efhJx4B8+Z9pzdDM0fsKEyCuhDJxgqUO6G8Qzu cfH+2QeJB6a5zRrDDimwWCbqRhTfukdTW6k46TFEHvVl856//Sr8VWavXj6mVS5ElFME QuTbshBmaJNNf/dXSJPufuZAP6RQN0Qb0NQoDaPTteYZs3HpgShzQkTMHYW/NS+G07l0 /CavxJ/W/AN5JNk7UDnpXrELA4NICg3KJ30v5XiRfEFrEFtkFBXFwiOyPdvjCF4ljyHm RmKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=VqxrH8+O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o4-v6si266370plk.582.2018.02.09.11.18.14; Fri, 09 Feb 2018 11:18:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=VqxrH8+O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752327AbeBITRi (ORCPT + 99 others); Fri, 9 Feb 2018 14:17:38 -0500 Received: from mail-it0-f50.google.com ([209.85.214.50]:36504 "EHLO mail-it0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751010AbeBITRh (ORCPT ); Fri, 9 Feb 2018 14:17:37 -0500 Received: by mail-it0-f50.google.com with SMTP id n206so11942850itg.1 for ; Fri, 09 Feb 2018 11:17:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=I/arvUcUKIlpe1kgARr0ggMZ4cFI3JvQrAPM/Y1Yd6A=; b=VqxrH8+OywvbVauLAmNXSnT0uMA+3U07gbWE64dXcpdMYqFVbDP9LO7QDFMzeYOBOJ SeuO4MmClc+yCiIbQr1ucRMVMb4pULluNLfRL1rKdTfyQYQ1MdFF8S2vdQRINdRci1wX Pfb7at1uiWx9OW4ymYncVhc2M9K+XClRNts/bamgckm0O6dPyP3+4PB15prgjFhF/Cye 6bxatWXZBLhqr2XF4kY/nlAZWeyWGIAPVFMOMHaynFl96s6S7vkjei+i2qrNGf8W6zdc ngraBtwvB2fD32lcdZa8WKN/1QjbhxyNeIFoeDTeAzyZg4m39pgCXsF1u4JoJgLoZaRJ DttA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=I/arvUcUKIlpe1kgARr0ggMZ4cFI3JvQrAPM/Y1Yd6A=; b=moZslBT9+egrwI7d6O20ueP+26I45x8khH6T0Mf3eUT0gXSlPuu8P7QR2dCZta4gTr 1BHQ1RYVgKZoAH4X40X8tP2ARlrKjzuP/khUw8hmsusdPJ4+387PzkVV4V2q0rgh5VXd U7S9rjhav93JB8PXMdssWpWak0cqKNRd7VMsjnw3MHolL9oSNcVJ7a/a4xHxGB8XDdMi idb8tVRk74HKLNy0NhfIlB90BR/YD0/oafWHh/44VY/LGaTl2c6LwfTNvAegKSqZFDFQ 4iqVsAzSp/qIzPSWQbSrfGxolqFMX6XM2qYpOX5pPxXMBL0iVgNYYYXhM34cwdmDvsFi lOzQ== X-Gm-Message-State: APf1xPA/wDQOMAZO+oIe8pQtXwZ5Z5ZAnVL02mQAgAM0kTv6BWjDIiDN VB96RXhnkrnzsyn1ZEWgRMPCDqbeoPEVsJCxWSM= X-Received: by 10.36.94.199 with SMTP id h190mr4495307itb.21.1518203856138; Fri, 09 Feb 2018 11:17:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.59.196 with HTTP; Fri, 9 Feb 2018 11:17:35 -0800 (PST) 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 X-Google-Sender-Auth: dE0jcPgjrO-d56xYOmg3SgjsQNA Message-ID: Subject: Re: [PATCH 09/31] x86/entry/32: Leave the kernel via trampoline stack 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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