From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vincenzo Frascino Subject: Re: [PATCH v5 02/23] kernel: Define gettimeofday vdso common code Date: Wed, 27 Feb 2019 16:06:49 +0000 Message-ID: <65173128-04b3-fd03-247b-d090703244ac@arm.com> References: <20190222122430.21180-1-vincenzo.frascino@arm.com> <20190222122430.21180-3-vincenzo.frascino@arm.com> <9c1da773-7fae-69ad-484b-224f3e76ea09@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Thomas Gleixner Cc: linux-arch@vger.kernel.org, Shuah Khan , Arnd Bergmann , Catalin Marinas , Daniel Lezcano , Will Deacon , Russell King , Ralf Baechle , Mark Salyzyn , Paul Burton , Dmitry Safonov <0x7f454c46@gmail.com>, Rasmus Villemoes , Peter Collingbourne , linux-arm-kernel@lists.infradead.org List-Id: linux-arch.vger.kernel.org On 27/02/2019 15:49, Thomas Gleixner wrote: > Vincenzo, > > On Wed, 27 Feb 2019, Vincenzo Frascino wrote: >> >> The clocksource array has two elements (CLOCKSOURCE_RAW, CLOCKSOURCE_MONO) and >> the situation with my scheme should be the following: > > Oops. I misread the patch, but still... > >> u32 seq: + 0 >> s32 clock_mode; + 4 >> u64 cycle_last; + 8 >> struct vdso_cs cs[2]; + 16 >> struct vdso_ts basetime[VDSO_BASES]; + 48 >> >> which I agree makes still things a bit worse. > >>> It's easy enough to benchmark these implementations and without trying I'm >>> pretty sure that you can see the performance drop nicely. Please do so next >>> time and provide the numbers in the changelogs. >>> >> >> I did run some benchmarks this morning to quantify the performance impact and >> seems that using vdsotest[1] the difference in between a stock linux kernel >> 5.0.0-rc7 and one that has unified vDSO, running on my x86 machine (Xeon Gold >> 5120T), is below 1%. Please find the results below, I will add them as well to >> the next changelog. > > I have some doubts about 1%. > NEW STOCK > clock-gettime-monotonic: vdso: 31 28 ~ 10% slower > clock-gettime-realtime: vdso: 32 29 ~ 10% slower > Sorry, there was an error in my script that I used to extract percentages. I agree! Luckily I shared the numbers. Thanks Thomas. > Thanks, > > tglx > -- Regards, Vincenzo From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com ([217.140.101.70]:35036 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726265AbfB0QGx (ORCPT ); Wed, 27 Feb 2019 11:06:53 -0500 Subject: Re: [PATCH v5 02/23] kernel: Define gettimeofday vdso common code References: <20190222122430.21180-1-vincenzo.frascino@arm.com> <20190222122430.21180-3-vincenzo.frascino@arm.com> <9c1da773-7fae-69ad-484b-224f3e76ea09@arm.com> From: Vincenzo Frascino Message-ID: <65173128-04b3-fd03-247b-d090703244ac@arm.com> Date: Wed, 27 Feb 2019 16:06:49 +0000 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Thomas Gleixner Cc: linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Arnd Bergmann , Russell King , Ralf Baechle , Paul Burton , Daniel Lezcano , Mark Salyzyn , Peter Collingbourne , Shuah Khan , Dmitry Safonov <0x7f454c46@gmail.com>, Rasmus Villemoes Message-ID: <20190227160649.RZkbv2YCnshXgK3BsAWCohwafJONA0fbySIoVdw5hoc@z> On 27/02/2019 15:49, Thomas Gleixner wrote: > Vincenzo, > > On Wed, 27 Feb 2019, Vincenzo Frascino wrote: >> >> The clocksource array has two elements (CLOCKSOURCE_RAW, CLOCKSOURCE_MONO) and >> the situation with my scheme should be the following: > > Oops. I misread the patch, but still... > >> u32 seq: + 0 >> s32 clock_mode; + 4 >> u64 cycle_last; + 8 >> struct vdso_cs cs[2]; + 16 >> struct vdso_ts basetime[VDSO_BASES]; + 48 >> >> which I agree makes still things a bit worse. > >>> It's easy enough to benchmark these implementations and without trying I'm >>> pretty sure that you can see the performance drop nicely. Please do so next >>> time and provide the numbers in the changelogs. >>> >> >> I did run some benchmarks this morning to quantify the performance impact and >> seems that using vdsotest[1] the difference in between a stock linux kernel >> 5.0.0-rc7 and one that has unified vDSO, running on my x86 machine (Xeon Gold >> 5120T), is below 1%. Please find the results below, I will add them as well to >> the next changelog. > > I have some doubts about 1%. > NEW STOCK > clock-gettime-monotonic: vdso: 31 28 ~ 10% slower > clock-gettime-realtime: vdso: 32 29 ~ 10% slower > Sorry, there was an error in my script that I used to extract percentages. I agree! Luckily I shared the numbers. Thanks Thomas. > Thanks, > > tglx > -- Regards, Vincenzo