Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1430998imm; Thu, 4 Oct 2018 13:33:28 -0700 (PDT) X-Google-Smtp-Source: ACcGV61tF+q/UvBHLwja3vt9oBvbWLX+9q43JINBdxZj+IIz6UYpv2cG9IBcYqKarQsxPDUfxSGr X-Received: by 2002:a63:1411:: with SMTP id u17-v6mr7087579pgl.247.1538685208445; Thu, 04 Oct 2018 13:33:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538685208; cv=none; d=google.com; s=arc-20160816; b=fkJF/57pofoZAy/ElTZVJCpFiy139B0hJ/qI2auppSvBJSizeCJpVHSYSKXto88l+F g+dSSA1wO/x96o9p5ymnpYTNt0io3Z9zex7FG2wvDm05gtDxyxp5MKmvSoxl204jm0a6 qe59/pkpb1n2HaOjQNSLh70a/wPwDXmJdBk9CPeBO9L3c9ac54jT/ZThnt9CgABgZcA7 ddjtwE9vDHizsMZKw5gMPVXNWVgE7WVl6EGO1rWRgUb2D9fLQIitKCZ4DAY4L7gcXsih QvXqm50TCQLcDBgNfA/+VJt2a8diT77cLW+maQUjbarEA0DzIH6XcwKG5uQ4DG0JPz7Y r/qg== 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 :in-reply-to:references:mime-version:dkim-signature; bh=MK5ZBGcOeIY1wXAHAc109e1E8haLBugVxQihl0Q1Cdk=; b=aoz+l6XUeR3TzODevI68KTQ1H1oVgAwhhr1CUd8SGK6VMV6jDcslDkKojXX9E7/HQQ fY3XIYo01JIcjY3rllf30zQZTe1QLtEOL4NpA2tKd/RPUeYYxpYHITMHzNSMImK9YH0N UnVY8Gp6Ad1aqXP1sFfmQ0/rG5cXJYn/fnXwNqwChtEMQ+NtF7JQ1TPIyXamlS3dAgRL 7AZxQarbabzGzaitNFmwUsT8DJiwXetz63t8frK3hrpYCRANoOlvo1VZO0OtLoZreYct rJetWj/fV00ZmJK5MOh4g829nfT5OUoRtlSW6QVVmOHxIVU3MIzsJrxDyq08ikZSjZrZ OvYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kGcfFeK2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c22-v6si6020387pgk.292.2018.10.04.13.33.11; Thu, 04 Oct 2018 13:33:28 -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; dkim=pass header.i=@kernel.org header.s=default header.b=kGcfFeK2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727535AbeJED2A (ORCPT + 99 others); Thu, 4 Oct 2018 23:28:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:51360 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727354AbeJED2A (ORCPT ); Thu, 4 Oct 2018 23:28:00 -0400 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AAF7520877 for ; Thu, 4 Oct 2018 20:33:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1538685185; bh=1UUooz/fRuRcam298BYDbg/j4xYcekEvFJ439UZ+w9E=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=kGcfFeK2QJ0T9xc1BTXJZkCFnXZ++UkHQ1yt/ZiWr+T3+AdnjgzR471q454jb4qy6 TazwoUSS2dJZDypwPs990Tb+JXa8csH2YsV5hvZ1OtoJrMgs8+e4DWrNOhBK4I5bJX o6KwJ3TE8Rb+CFFJNwpLH5jeDQj9EPyiXyItDLMo= Received: by mail-wm1-f48.google.com with SMTP id y140-v6so2332366wmd.0 for ; Thu, 04 Oct 2018 13:33:04 -0700 (PDT) X-Gm-Message-State: ABuFfojb6DQcQhZOyIIkyJMzEOMh3TA1HBdeTaEFtsFMUEswfoCcUyda LivHtJWh1/8J//4rCwc3YmQQAtcGT3VK8oldqSjFtg== X-Received: by 2002:a1c:1fcd:: with SMTP id f196-v6mr5852770wmf.19.1538685183104; Thu, 04 Oct 2018 13:33:03 -0700 (PDT) MIME-Version: 1.0 References: <20180914125006.349747096@linutronix.de> In-Reply-To: <20180914125006.349747096@linutronix.de> From: Andy Lutomirski Date: Thu, 4 Oct 2018 13:32:51 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support To: Thomas Gleixner Cc: LKML , Andrew Lutomirski , X86 ML , Peter Zijlstra , Matt Rickard , Stephen Boyd , John Stultz , Florian Weimer , KY Srinivasan , Vitaly Kuznetsov , devel@linuxdriverproject.org, Linux Virtualization , Paolo Bonzini , Arnd Bergmann , Juergen Gross 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, Sep 14, 2018 at 5:52 AM 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. If jump tables > are disabled it adds yet another conditional to the existing maze. > > This series takes a different approach by consolidating the almost > identical functions into one implementation for high resolution clocks and > one for the coarse grained clock ids by storing the base data for each > clock id in an array which is indexed by the clock id. > > This completely eliminates the switch case and allows further > simplifications of the code base, which at the end all together gain a few > cycles performance or at least stay on par with todays code. The resulting > performance depends heavily on the micro architecture and the compiler. tglx, please consider this whole series Acked-by: Andy Lutomirski Please feel free to push it top tip:x86/vdso, as long as you pull in tip/x86/urgent first. Once it lands, I'll email out a couple of follow-up patches. --Andy