Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5732303imm; Wed, 12 Sep 2018 10:13:52 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZrVZX2SyDh9WBr3pKYmAsPjoGlAECDWbIId5XDiaMXSyZzch0xjky4wc3zTNAe8h1BDySL X-Received: by 2002:a17:902:7488:: with SMTP id h8-v6mr3409886pll.16.1536772432458; Wed, 12 Sep 2018 10:13:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536772432; cv=none; d=google.com; s=arc-20160816; b=v7bkSLHpDy6wy/JTA2iXo/HczdQ3UTs8IZQZYWk4zLjEjuKXewaNjeFdp1aMy9QpLM vvcGUAXsMNRAUZTKHMOK5rPYCKrEkM9xtGeeOPzWN8Ey1r0vfKL6j4PbTkX3e+oCAnB2 Psmw4U0kOls72al4ajJLTpkpExgDbsIw/j26bqWbxaFD1QMRkKkbhwd82KxLcQtrUdIP yLn9V3BiDxij30FAkUik2Y2k+f0nZ9Z4/mvff8fZ6ykzZ6fm0UtCc5OGxGINhLUC+9nG Ga00nVd/HFqxqNPUgm3D+wKx4WGtfZ/UJhjOLRILYy3X8nttHWgW41tlJVxvu3wn0e1h dnLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=GwvVeCNQr0AZFcyw2w3rohFbhNypGakngJrAlDeBqkM=; b=mt93t+cW3uOUVX+X1RFP8IySmTiwsR+TIq0t9kXECMMDbTjwDI0R7v55GCsqpDN6Y0 7hvUUguUrppD+As4a1Rf+yAYLJqo635g1uzpTPXZOAaiZM181+AmDWBwsU4vbeNI2PW6 65TkzgJL8YXCgzpIQ91IqGd3WKUFN7MoiSJ2FCdE2cjMec71G3XF8mf5I6dvLBVc9W6b 3Gr/QLK1KSf+vb8LrzTj5YSQtATQll3saZe/4RnNKJwTmp9Zi38hU9bQzMNnskTwIwga TpOcfx3ZLm7MwLcPQwxHsl1PyNZfEn5P8LE2P1UPcLvjqtDw8hK65Xkbu+Y/MDHYh7av 4KyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=to9V1edX; 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 i8-v6si1410975pfo.128.2018.09.12.10.13.36; Wed, 12 Sep 2018 10:13:52 -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=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=to9V1edX; 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 S1727772AbeILWRN (ORCPT + 99 others); Wed, 12 Sep 2018 18:17:13 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:43230 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726428AbeILWRN (ORCPT ); Wed, 12 Sep 2018 18:17:13 -0400 Received: by mail-pf1-f194.google.com with SMTP id j26-v6so1315690pfi.10 for ; Wed, 12 Sep 2018 10:11:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=GwvVeCNQr0AZFcyw2w3rohFbhNypGakngJrAlDeBqkM=; b=to9V1edXB/oZyKMgCXVSirEmI8Bruia8ok+Y+Sf1rbaD1OpXMJuwsSCgFGQ4w/yXAi RXRijLtIxSQpjUD9NUehsiDYyB9M8ROPvlzC19v2XzBh1RmVDAHyMIadWFJBWeogKosq yd+ULWyZqtZfKNCfXnBQZw0xYnqu4bA6YhKPHqZ+TprrD5jXkYMtElCQT6l6i0xy490K 0b/8h1GkJYjnfA2ahQQTSbhKVcDIztBjJoSlYUs7rAivnF1ediSQZaC+5ATvncZ1sp4i 7CryMTtUogTdUQpUHA8evKBhGefpTP7oMbZw/cPJ0vmKJtwIC9E7wPgFn7NjLij9yfox 4Pvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=GwvVeCNQr0AZFcyw2w3rohFbhNypGakngJrAlDeBqkM=; b=DY3pVj+luxCRE3TeZHi6EMaQ4dMoz9KRv+989iPWENDusadwdKo1+L7TVT64whMZfD VmIw3gRrhx2hrnUC1uJKyN8vrf3QZCIDmkHY29jYLrG9gyxyaCVWt3omAuXsiFJ4+I7G fas7ORESCsphATllKVq8twI52yON/yiKiq7tPzW/G9jH18CmevF0iJ3xjwp0SRlUJhW8 nY130gnxkT+JswqAKg3HWLUGZnlQHVmVdzgtlKeQzAl3V5oR/HHKSRvYXZSvT8CT9re3 ZOohnRcgC26cS44jJHqC5zOZ1lpZf6DgNg4WzLSYrTqjXus7tWXRMZ45XjddHQlfnzWd jlgA== X-Gm-Message-State: APzg51Ceeoeq/bZ2SYa5sW9qHgXEX0PLgF2VlR4U5Y1FbWFWGoeRyEF7 WKHBcrz6kC1Hg/Bfk9pug6JWuA== X-Received: by 2002:aa7:831b:: with SMTP id t27-v6mr3474738pfm.81.1536772304794; Wed, 12 Sep 2018 10:11:44 -0700 (PDT) Received: from ?IPv6:2601:646:c200:7429:30fd:73d0:94df:b819? ([2601:646:c200:7429:30fd:73d0:94df:b819]) by smtp.gmail.com with ESMTPSA id i65-v6sm3116307pfk.43.2018.09.12.10.11.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 10:11:43 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v3] x86/vdso: Handle clock_gettime(CLOCK_TAI) in vDSO From: Andy Lutomirski X-Mailer: iPhone Mail (15G77) In-Reply-To: Date: Wed, 12 Sep 2018 10:11:42 -0700 Cc: Florian Weimer , Andy Lutomirski , Matt Rickard , Stephen Boyd , John Stultz , X86 ML , LKML Content-Transfer-Encoding: quoted-printable Message-Id: References: <20180901015935.CCF0B18E20A9@virtux64.softrans.com.au> <59403142-1073-3926-65dd-ac55ead357b9@redhat.com> To: Thomas Gleixner Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Sep 12, 2018, at 7:29 AM, Thomas Gleixner wrote: >=20 >> On Wed, 12 Sep 2018, Florian Weimer wrote: >>> On 09/12/2018 04:17 PM, Thomas Gleixner wrote: >>>> On Wed, 12 Sep 2018, Florian Weimer wrote: >>>> Does this mean glibc can keep using a single vDSO entrypoint, the one w= e >>>> have today? >>>=20 >>> We have no intention to change that. >>=20 >> Okay, I was wondering because Andy seemed to have proposed just that. >>=20 >>> But we surely could provide separate entry points as an extra to avoid a= >>> bunch of conditionals. >>=20 >> We could adjust to that, but the benefit would be long-term because it's a= n >> ABI change for glibc, and they tend to take a long time to propagate. >>=20 >> But I must say that clock_gettime is an odd place to start. I would have= >> expected any of the type-polymorphic multiplexer interfaces (fcntl, ioctl= , >> ptrace, futex) to be a more natural starting point. 8-) >=20 > Well, the starting point of this was to provide clock_tai support in the > vdso. clock_gettime() in the vdso vs. the real syscall is a factor of 10 i= n > speed. clock_gettime() is a pretty hot function in some workloads. >=20 > Andy then noticed that some conditionals could be avoided entirely by usin= g > a different entry point and offered one along with a 10% speedup. We don't= > have to go there, we can. >=20 > The multiplexer interfaces need much more surgery and talking about futex,= > we'd need to sit down with quite some people and identify the things they > actually care about before just splitting it up and keeping the existing > overloaded trainwreck the same. >=20 There=E2=80=99s also the issue of how much the speedup matters. For futex, m= aybe a better interface saves 3ns, but a futex syscall is hundreds of ns. cl= ock_gettime() is called at high frequency and can be ~25ns. Saving a few ns i= s a bigger deal.=