From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5F2BC2D0A3 for ; Thu, 29 Oct 2020 12:00:15 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 91ABA20796 for ; Thu, 29 Oct 2020 12:00:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hTk6nXhk"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Dh/5U+wv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91ABA20796 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=B9I/mPOwFgPCAMRzsaX+wHf05Z+PQXCpiMQSpMz/T4I=; b=hTk6nXhkGOsdsmHu8FoKrj0Or HJ3H4SH3rzj0T0E3sGW3H4pASQbmOPrsixP0hoML89lWMfn00BsofzHs2OHgP8+2+l2Jml3P8tSCv qqaTyFcvyvKEhsJvzA417VWdQpg8mqF+rcNf1sBdOuTBbSpKVYOlE7cn+fBjDJmv0yN5y0eRHMe6F Cy/Gp6JDxVEEJZm9TE95NoYzbUxnRJ1mxoFIib5Jt0vFI/pE3LUevYQYnP0tLnAzTZL15IesgRs0B s1yK2YyVk3OeUEdZtz47/lxV8tRc25atYOumQ9jAr5aFpIAits+mC35JWyfjzMGMaA/Mri0791LBF Ez0UsZCPQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kY6ae-000692-Ki; Thu, 29 Oct 2020 11:59:36 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kY6Zj-0005kU-3k for linux-arm-kernel@merlin.infradead.org; Thu, 29 Oct 2020 11:58:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=x88GiwpnQ2eV0DwuaQNsyhnKmZfmU2+z6bX5B7saBwY=; b=Dh/5U+wvuR9RPUn+gZBapBtzna eerGV+bPugVFZ7LhH1xtjTYbl2rniiudvj4KWs31enlVbofVAaiM5/7wmkVzc04KgnYRRs3lT7Cxm d4dENga/Mc5L4tB44rWYCywnIpOxypac6gPlmgEPlXGOOMc2MO6WjNQM3Ns3+qLT6lisuqFjMRPbx pFrMmKhA7R0uL//IXf4kYMLMZriKF/AbinK0ZNYkhOv3E43izDgCA6QHXcABidNPNcy3piYdlOqgD rGj8CllAvooAtO6bystrqNKMF1qMTnX0HYxem5wfQvHLFbSXmL9AKhNiNtCmYyLY5TbC9UidLOQU9 bzaSYIlw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kY6Ze-0002Df-3a; Thu, 29 Oct 2020 11:58:34 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 143C630767C; Thu, 29 Oct 2020 12:58:33 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id EF04C2C324409; Thu, 29 Oct 2020 12:58:32 +0100 (CET) Date: Thu, 29 Oct 2020 12:58:32 +0100 From: Peter Zijlstra To: Mark Rutland Subject: Re: [PATCH v2] arm64: implement support for static call trampolines Message-ID: <20201029115832.GO2628@hirez.programming.kicks-ass.net> References: <20201028184114.6834-1-ardb@kernel.org> <20201029115026.GA61831@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201029115026.GA61831@C02TD0UTHF1T.local> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: catalin.marinas@arm.com, will@kernel.org, Ard Biesheuvel , linux-arm-kernel@lists.infradead.org, james.morse@arm.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Oct 29, 2020 at 11:50:26AM +0000, Mark Rutland wrote: > Hi Ard, > > On Wed, Oct 28, 2020 at 07:41:14PM +0100, Ard Biesheuvel wrote: > > Implement arm64 support for the 'unoptimized' static call variety, > > which routes all calls through a single trampoline that is patched > > to perform a tail call to the selected function. > > Given the complexity and subtlety here, do we actually need this? Only if you can get a performance win. The obvious benefit is loosing the load that's inherent in indirect function calls. The down-side of the indirect static-call implementation is that it will incur an extra I$ miss. So it might be a wash, loose a data load miss, gain an I$ miss. The direct method (patching the call-site, where possible) would alleviate that (mostly) and be more of a win. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel