Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp5354126ybg; Tue, 22 Oct 2019 01:48:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJeWXQJnmR2HQ1kFr/qFmf3x6LBje7mPrI47kZpToe6KdS/LzVaXWn01woGb0QvSmqUA29 X-Received: by 2002:a17:906:2319:: with SMTP id l25mr26302714eja.309.1571734119286; Tue, 22 Oct 2019 01:48:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571734119; cv=none; d=google.com; s=arc-20160816; b=G1qKmqvgi1FHxra93aw2zZEdWHDDUBNxPBo0VHuQL62o7kk05cU0+2n5jeFPwUk1Nh CYpuP9oEjxVsaxbwEHeDggBAxRfkUOhv3tYWX81i5igeZyEH4qe178jtS6euThoLPFJj DITPpBsrGeQFC24yBkBOE/Ia5wNHxZ4jqIv6kNvBhRuIS20q2wKusnCaW/uGS1aSeMON h7YRud+be5dVJjSqUfYDphI+V8kh15ieRWZsoC6c71VsYJHNLtYpYZIFs1Z/EgiD94Zs LZappmc+639EUBr1qFhBGMfApeD1K9kJRvoEeEeFlpt+bxLl5Wsdn7mb/x51WDGr6jxO n/uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=gbVCuO1WQVx+qJcG6Sg/Opdkgu7URi3xiu037hazHk4=; b=X2QFI/pWn3BgG/iAR8WE6GT8qp97Hn0CNE4DnhdmZwxCUyRQc3ClVH9B7wlzC4s9mg rwNY/P3yV68OD67dwSjqCv/J+XZ1XUQTOtE5D6VBto/FEe7S5d+T33u5gra21Mp5nwEM k+8DUhiDzJyrMFmo84JT1EXQx7oMO/UGc4yJJIdoKw5IjdNcR4oAW3oFseWWTOmi4L0J Fxur/s/RCRo5pJ1Xxfay3qAyxFxpxiZ8q4aZ4QcdIH6byOWBmyzehkJckEMvRzHqdHmp oAbUd7prfzxXKAMJlHvzg9QoXxb07Fxm42LLapwbpzHpzRpc3iBREH4wmFjqu/IR7z7z B1UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TWDMknpF; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1si4215882eji.76.2019.10.22.01.48.15; Tue, 22 Oct 2019 01:48:39 -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=@gmail.com header.s=20161025 header.b=TWDMknpF; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388664AbfJVIp3 (ORCPT + 99 others); Tue, 22 Oct 2019 04:45:29 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:39684 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388490AbfJVIp2 (ORCPT ); Tue, 22 Oct 2019 04:45:28 -0400 Received: by mail-pf1-f195.google.com with SMTP id v4so10211006pff.6; Tue, 22 Oct 2019 01:45:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=gbVCuO1WQVx+qJcG6Sg/Opdkgu7URi3xiu037hazHk4=; b=TWDMknpFoCT949orSWtnAoCgM5tn9MwYr5BqaG5sz0b8Pp8RF1XKdZ8OpbAFefH31p Ix+rM6Lj4xO8zOxphrKRhE48ZA5k5mpdKjqqh9k1DLZaFJ3wdcJufdEavsVF4gWtMrGj epHromsW1B/v2SXqRVRl9U9Y8+V55NALadNSh8dCp79PYWg63p03pEC/7NQLw8mjcP3z noYiIetKYDZPslISEFvGFJxAeMmGMhsOcUwh93hllqGlrrdWKcT/B0rvoJJOT+EnmCFc +WZh3JE+WiZihLWhOhvsp3uP9bInUQS/J0JC6PyEjNzTwJNeWz8AbsmjOgy5iVJC2nqi kstQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=gbVCuO1WQVx+qJcG6Sg/Opdkgu7URi3xiu037hazHk4=; b=MxKt1gMuHFKGTd+rsPscpV3zI7OyIYu4K4xLRNPnZL2vYMI0q4Mm6FH3GYmR2EwMCz 9QGKq5u/eMoPPKN5DmCPjXHhVc5zjbH3hNB7Z9WlfJDPYpb/3qhcgSwKRaJ6gVe1w1tq TN1Q8vD5aOzuE7hJWkyvhk7tmrUNOa1YoEuAedrMkpLgSFXFVJbAYvFp3Eufn7bqEYE3 ctqA1nmBvrWN78V2rW6HaXXhYyUaDVh1+czQl3DLTl6BImAmSbN31r1c59RKZcEztAJS qphuTAi97VA5z7IxZkPmGyw3pczc29lNyOxTtRcbGvolNqVsdfgX1dV5LEWEbd191vi0 LACw== X-Gm-Message-State: APjAAAUSfwBkBMD7or4xcUvFL1XXMUmQA+BuTNoKGF2RKlFhNdeah4NE d/05u4udhd3A/XRyCR6AWGo= X-Received: by 2002:a63:cc4a:: with SMTP id q10mr2536282pgi.221.1571733926664; Tue, 22 Oct 2019 01:45:26 -0700 (PDT) Received: from gmail.com ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id o9sm22716329pfp.67.2019.10.22.01.45.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2019 01:45:25 -0700 (PDT) Date: Tue, 22 Oct 2019 01:45:23 -0700 From: Andrei Vagin To: Thomas Gleixner Cc: Dmitry Safonov , linux-kernel@vger.kernel.org, Dmitry Safonov <0x7f454c46@gmail.com>, Adrian Reber , Andrei Vagin , Andy Lutomirski , Arnd Bergmann , Christian Brauner , Cyrill Gorcunov , "Eric W. Biederman" , "H. Peter Anvin" , Ingo Molnar , Jann Horn , Jeff Dike , Oleg Nesterov , Pavel Emelyanov , Shuah Khan , Vincenzo Frascino , containers@lists.linux-foundation.org, criu@openvz.org, linux-api@vger.kernel.org, x86@kernel.org Subject: Re: [PATCHv7 00/33] kernel: Introduce Time Namespace Message-ID: <20191022084523.GA2923@gmail.com> References: <20191011012341.846266-1-dima@arista.com> <20191017234748.GA26011@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20191017234748.GA26011@gmail.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 17, 2019 at 04:47:48PM -0700, Andrei Vagin wrote: > > In my table, the "before" column is actually for the upstream kernel > with the 18-th patch. Here is the table with the real "before" column: > > | before | with 18/33 | CONFIG_TIME_NS=n | host | inside timens > ------------------------------------------------------------------------------ > avg | 150331408 | 153345935 | 153588088 | 150816637 | 139192114 > ------------------------------------------------------------------------------ > diff % | 98 | 100 | 100.1 | 98.3 | 90.7 > ------------------------------------------------------------------------------ > stdev % | 0.3 | 0.09 | 0.15 | 0.25 | 0.13 > > If we compare numbers in "before", "host" and "inside timens" columns, we > see the same results that you had. clock_gettime() works with the > same performance in the host namespace and 7% slower in a time > namespace. > I played with this a bit more and I've found that we can speed up clock_gettime on 5% more if we mark do_hres and do_coarse as __always_inline. With the unlikely hint in vdso_read_begin and noinline for do_hres_timens and do_coarse_timens: 1..8 ok 1 host: clock: monotonic cycles: 155278332 ok 2 host: clock: monotonic-coarse cycles: 662067077 ok 3 host: clock: monotonic-raw cycles: 151218057 ok 4 host: clock: boottime cycles: 154907635 ok 5 ns: clock: monotonic cycles: 133100433 ok 6 host: clock: monotonic-coarse cycles: 444170219 ok 7 host: clock: monotonic-raw cycles: 129550178 ok 8 ns: clock: boottime cycles: 130167136 With __always_inline for do_hres and do_coarse: 1..8 ok 1 host: clock: monotonic cycles: 163691015 ok 2 host: clock: monotonic-coarse cycles: 641443397 ok 3 host: clock: monotonic-raw cycles: 163649270 ok 4 host: clock: boottime cycles: 163682242 ok 5 ns: clock: monotonic cycles: 138759212 ok 6 host: clock: monotonic-coarse cycles: 486149502 ok 7 host: clock: monotonic-raw cycles: 134801053 ok 8 ns: clock: boottime cycles: 138675460 # Pass 8 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0 With __always_inline for do_hres, do_coarse, do_hres_timens, do_coarse_timens: 1..8 ok 1 host: clock: monotonic cycles: 158984538 ok 2 host: clock: monotonic-coarse cycles: 594932695 ok 3 host: clock: monotonic-raw cycles: 157834511 ok 4 host: clock: boottime cycles: 158297691 ok 5 ns: clock: monotonic cycles: 148559612 ok 6 host: clock: monotonic-coarse cycles: 468505657 ok 7 host: clock: monotonic-raw cycles: 146366575 ok 8 ns: clock: boottime cycles: 148573015 # Pass 8 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0 Thanks, Andrei