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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 AFBCBC31E44 for ; Fri, 14 Jun 2019 12:16:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8398421473 for ; Fri, 14 Jun 2019 12:16:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727619AbfFNMQF (ORCPT ); Fri, 14 Jun 2019 08:16:05 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:37706 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727573AbfFNMQF (ORCPT ); Fri, 14 Jun 2019 08:16:05 -0400 Received: from [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 1hbl7g-0002bC-Mi; Fri, 14 Jun 2019 14:16:00 +0200 Date: Fri, 14 Jun 2019 14:16:00 +0200 (CEST) From: Thomas Gleixner To: Vincenzo Frascino cc: Arnd Bergmann , linux-arch , Linux ARM , Linux Kernel Mailing List , linux-mips@vger.kernel.org, "open list:KERNEL SELFTEST FRAMEWORK" , Catalin Marinas , Will Deacon , Russell King , Ralf Baechle , Paul Burton , Daniel Lezcano , Mark Salyzyn , Peter Collingbourne , Shuah Khan , Dmitry Safonov <0x7f454c46@gmail.com>, Rasmus Villemoes , Huw Davies Subject: Re: [PATCH v6 00/19] Unify vDSOs across more architectures In-Reply-To: Message-ID: References: <20190530141531.43462-1-vincenzo.frascino@arm.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On Tue, 4 Jun 2019, Vincenzo Frascino wrote: > On 31/05/2019 09:46, Arnd Bergmann wrote: > > One open question I touched in my review is whether we want to > > have a vdso version of clock_getres() in all architectures or not. > > I'd prefer to leave it out because there is very little advantage to > > it over the system call (the results don't change at runtime and > > can easily be cached by libc if performance ever matters), and > > it takes up a small amount of memory for the implementation. > > > > I thought about it and I ended up with what proposed in this patchset mainly for > symmetry across all the architectures since in the end they use the same common > code. > > It seems also that there is some performance impact (i.e.): > > clock-getres-monotonic: libc(system call): 296 nsec/call > clock-getres-monotonic: libc(vdso): 5 nsec/call clock_getres() is usually not a hot path operation. > I agree with you though when you say that caching it in the libc is a > possibility to overcome the performance impact. > > > We shouldn't just need it for consistency because all callers > > would require implementing a fallback to the system call > > anyway, to deal with old kernels. libc has the fallback already. Let's aim for 1:1 replacement of the architecture code first and then add the extra bits in separate patches. Thanks, tglx