Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp784643imm; Fri, 14 Sep 2018 06:21:45 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZrQMi3jriIrNxmP6iq435q1L6RE7D3IwRF0Oa7ybs8JPhM1vzwEADc5Qfz+F/RTuF0Y0WL X-Received: by 2002:a65:448c:: with SMTP id l12-v6mr12131630pgq.277.1536931305146; Fri, 14 Sep 2018 06:21:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536931305; cv=none; d=google.com; s=arc-20160816; b=PJ6wYoHYwhTVvnN98ek63ULJGjt3FosrpLyHFCoeWs+3N9g9TpVngiWEltUXMCm7sT 6VZctTp62RZQq27egY1OMmEL9bt96de1B2MYl8+wGRiuXVII/P1atI1x1LPLH+Rt/sGw TDWNQ2ngqOQMlVDgEoty8W1o8OAL6FObMYQQIcf1nyPWU46x2Gd1O8oTLMgBmdRXNANo jnDayyk5GeKuI1e69X237vGYWKYfgTZhah24mXHZZgX1V1VkAxg2RdnDdpKFR7F0FItO KD+kA9DxsTQPVRH7xZdEkYiAMXyG6IcugNKfhKYsEjDspPeygTcfNPyyZgyqoa2UBthF 1+ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=K39bNPKi/V3lC3LKCtaREXAywiXpVAzvR1OBV3sIsFE=; b=xHur1eSTAUqxtFNKv7HogJT61zimOC3QzRG5+O15MKHnzjcCgZbRSiOD/LWRSzEyJh kbWoAc55MrBEfC6MPS2JX0Gcg2TFoIrGDfuMe5lJZu0e4wDInCxhPjQUvSnDqyM+ma6r IeliS0LsCcuQzJqa2XD9HOOM0NAw/42xjKaA/k8cZpfLgojtEYyZNkCdI6D0N8CZmCEI WIcMlSdhUYDhIXj17NK/hCYpIjGtV7EudrZzKHQpLTr5R8kxmvhNSuYvaEeazgjSbnHu e7n4aXE0dyaDInsNaiWHlvRMmdg/Z9tyGNUX0DJgNqft0s+T8Vt5k8j+FRk9AYgorHrP hQXw== ARC-Authentication-Results: i=1; mx.google.com; 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 71-v6si7300651pfv.139.2018.09.14.06.21.30; Fri, 14 Sep 2018 06:21:45 -0700 (PDT) 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; 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 S1728237AbeINSd6 (ORCPT + 99 others); Fri, 14 Sep 2018 14:33:58 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:49975 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727746AbeINSd5 (ORCPT ); Fri, 14 Sep 2018 14:33:57 -0400 Received: from hsi-kbw-5-158-153-52.hsi19.kabel-badenwuerttemberg.de ([5.158.153.52] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1g0o0L-0006lC-05; Fri, 14 Sep 2018 15:19:25 +0200 Date: Fri, 14 Sep 2018 15:19:24 +0200 (CEST) From: Thomas Gleixner To: Florian Weimer cc: LKML , Andy Lutomirski , x86@kernel.org, Peter Zijlstra , Matt Rickard , Stephen Boyd , John Stultz , "K. Y. Srinivasan" , Vitaly Kuznetsov , devel@linuxdriverproject.org, virtualization@lists.linux-foundation.org, Paolo Bonzini , Arnd Bergmann , Juergen Gross Subject: Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support In-Reply-To: <63a0f67d-fdb1-e2fc-5d4d-4f3cfbf86fd1@redhat.com> Message-ID: References: <20180914125006.349747096@linutronix.de> <2f723b28-8f81-4b02-861c-42f756a8825a@redhat.com> <63a0f67d-fdb1-e2fc-5d4d-4f3cfbf86fd1@redhat.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 14 Sep 2018, Florian Weimer wrote: > On 09/14/2018 03:05 PM, Thomas Gleixner wrote: > > On Fri, 14 Sep 2018, Florian Weimer wrote: > > > > > On 09/14/2018 02:50 PM, Thomas Gleixner wrote: > > > > Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime() > > > > implementation, which extended the clockid switch case and added yet > > > > another slightly different copy of the same code. > > > > > > > > Especially the extended switch case is problematic as the compiler tends > > > > to > > > > generate a jump table which then requires to use retpolines. > > > > > > Does vDSO code really have to use retpolines? It's in userspace, after > > > all. > > > > Unless you have IBRS/STIPB enabled, you need user space ratpoutine as well. > > I don't think this is a consensus position, and it obviously depends on the > (sub)architecture. It does, but we are not building kernels for specific micro architectures nor do distros AFAIK. But that aside, even with jump tables the generated code (ratpoutine disabled) is not any better than with the current approach. It's even worse and needs the same optimizations at the end and then the main difference is that you have 3 copies of one function and 2 of the other. Not a win at all. Thanks, tglx