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=unavailable 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 3B220C31E44 for ; Fri, 14 Jun 2019 12:19:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1A73C208CA for ; Fri, 14 Jun 2019 12:19:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727721AbfFNMTT (ORCPT ); Fri, 14 Jun 2019 08:19:19 -0400 Received: from foss.arm.com ([217.140.110.172]:60964 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727362AbfFNMTT (ORCPT ); Fri, 14 Jun 2019 08:19:19 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4E2DA3EF; Fri, 14 Jun 2019 05:19:18 -0700 (PDT) Received: from [192.168.1.18] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C24183F246; Fri, 14 Jun 2019 05:19:15 -0700 (PDT) Subject: Re: [PATCH v6 00/19] Unify vDSOs across more architectures To: Thomas Gleixner 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 References: <20190530141531.43462-1-vincenzo.frascino@arm.com> From: Vincenzo Frascino Message-ID: <6f3bcd07-6eb4-53d6-d209-de42396a4ee2@arm.com> Date: Fri, 14 Jun 2019 13:19:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/14/19 1:16 PM, Thomas Gleixner wrote: > 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. > Ok, thanks Thomas, I will split the patches accordingly. > Thanks, > > tglx > -- Regards, Vincenzo