Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp3906915imd; Mon, 29 Oct 2018 14:23:29 -0700 (PDT) X-Google-Smtp-Source: AJdET5cl38XV5rA1DCmFgHnK5RndIs7gMW09CWkM/ErnQSW2eHv1xnOHWFG+bLSJNkdoxLXNzS6e X-Received: by 2002:a63:111c:: with SMTP id g28mr15164350pgl.85.1540848209060; Mon, 29 Oct 2018 14:23:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540848209; cv=none; d=google.com; s=arc-20160816; b=vVNVc7xNksJsGglX+pUgBRLJYGLa27286lR78dCGFqR10m2IY0AFu98JYHfYpGzxWo +nlR06CLWFWkton3s1DfnZA6uyUHOX8TyIWfddcn5abyhJ0DwnIy7DdVbsPEfQ9Aq332 LstFz3vzb0ahAbh1jTe6d4xLGvmVH/d9wDw7aVT8UKsuKW00gPV3Vv/EWnnvObXRLmNW iM8VI3xSby2uoN3MYAXHsev8iXSPLvj55yFNKsS1CpYdOX75CYKcz0mKkdsFEYrFsV5z zY6Icb1Wca65tFURoqJDG7uflmgU9TIUd8CX9Q4DQEv3/AMBCp/E375doWHGQEjxkv5S Bw8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:mime-version:user-agent :message-id:in-reply-to:date:references:cc:to:from; bh=qXTY4eErTxOOK1C5FDh6IgUbpAos+V2Rh+BuWa8/cKw=; b=Cvz66gtIInFZrMhMfd3dbebV6ZJdTWpl62qMzJA2u+7V3KgTPftrKCJdbSNZMV5Pw6 7pNTQDoBdDGk5u3CSJKNhULkGlx44jORSM8vqWfJnXiTKC1ZbczFINLUdABSZkkjxGH6 HrAkLN+ZLgDU3CtfQ1OBxrp8Il8AXBUwLPMVlc81QH0/IhTcd5HlhpFqo4ptPLl+YUkD yK/k8WER0gM9mL7Z6S0xl2pWR3WdJGVPKDB6WWNB9CsSsTGLKrFh4z9FW0BOqj+CJAhh qKsLdmQRo6IMKLg2qmfSmSYDqpgsXt2Vk/a664tZh5SuDUDp+TUyCmeykHdC6CBYvL+l ODEA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=xmission.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n61-v6si20116959plb.169.2018.10.29.14.23.12; Mon, 29 Oct 2018 14:23:29 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=xmission.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727507AbeJ3GNR (ORCPT + 99 others); Tue, 30 Oct 2018 02:13:17 -0400 Received: from out02.mta.xmission.com ([166.70.13.232]:44780 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726568AbeJ3GNQ (ORCPT ); Tue, 30 Oct 2018 02:13:16 -0400 Received: from in01.mta.xmission.com ([166.70.13.51]) by out02.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1gHEzk-0001wC-0U; Mon, 29 Oct 2018 15:22:44 -0600 Received: from 67-3-154-154.omah.qwest.net ([67.3.154.154] helo=x220.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1gHEzU-00010P-8x; Mon, 29 Oct 2018 15:22:43 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Thomas Gleixner Cc: Andrei Vagin , "linux-kselftest\@vger.kernel.org" , Dmitry Safonov , "linux-api\@vger.kernel.org" , Jeff Dike , "x86\@kernel.org" , Dmitry Safonov <0x7f454c46@gmail.com>, "linux-kernel\@vger.kernel.org" , Oleg Nesterov , "criu\@openvz.org" , Ingo Molnar , Alexey Dobriyan , Andy Lutomirski , "H. Peter Anvin" , Cyrill Gorcunov , Christian Brauner , Pavel Emelianov , Shuah Khan , "containers\@lists.linux-foundation.org" , Adrian Reber , Peter Zijlstra References: <20180919205037.9574-1-dima@arista.com> <874lej6nny.fsf@xmission.com> <20180924205119.GA14833@outlook.office365.com> <874leezh8n.fsf@xmission.com> <20180925014150.GA6302@outlook.office365.com> <87zhw4rwiq.fsf@xmission.com> <87mus1ftb9.fsf@xmission.com> <20181021014121.GA23474@gmail.com> Date: Mon, 29 Oct 2018 16:21:57 -0500 In-Reply-To: (Thomas Gleixner's message of "Mon, 29 Oct 2018 21:33:14 +0100 (CET)") Message-ID: <87y3ag5tze.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1gHEzU-00010P-8x;;;mid=<87y3ag5tze.fsf@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=67.3.154.154;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1+dUC6N5uK9wc0m7Y2qv4oGFCrlAGyeNw8= X-SA-Exim-Connect-IP: 67.3.154.154 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa06.xmission.com X-Spam-Level: * X-Spam-Status: No, score=1.3 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,TVD_RCVD_IP,T_TM2_M_HEADER_IN_MSG,XMNoVowels autolearn=disabled version=3.4.1 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.4996] * 1.5 XMNoVowels Alpha-numberic number with no vowels * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: *;Thomas Gleixner X-Spam-Relay-Country: X-Spam-Timing: total 15027 ms - load_scoreonly_sql: 0.05 (0.0%), signal_user_changed: 2.8 (0.0%), b_tie_ro: 1.85 (0.0%), parse: 0.94 (0.0%), extract_message_metadata: 12 (0.1%), get_uri_detail_list: 2.1 (0.0%), tests_pri_-1000: 5 (0.0%), tests_pri_-950: 1.33 (0.0%), tests_pri_-900: 1.16 (0.0%), tests_pri_-90: 34 (0.2%), check_bayes: 32 (0.2%), b_tokenize: 11 (0.1%), b_tok_get_all: 10 (0.1%), b_comp_prob: 3.8 (0.0%), b_tok_touch_all: 4.1 (0.0%), b_finish: 0.69 (0.0%), tests_pri_0: 314 (2.1%), check_dkim_signature: 0.72 (0.0%), check_dkim_adsp: 3.7 (0.0%), tests_pri_10: 2.2 (0.0%), tests_pri_500: 14650 (97.5%), poll_dns_idle: 14638 (97.4%), rewrite_mail: 0.00 (0.0%) Subject: Re: [RFC 00/20] ns: Introduce Time Namespace X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thomas Gleixner writes: > Andrei, > > On Sat, 20 Oct 2018, Andrei Vagin wrote: >> When a container is migrated to another host, we have to restore its >> monotonic and boottime clocks, but we still expect that the container >> will continue using the host real-time clock. >> >> Before stating this series, I was thinking about this, I decided that >> these cases can be solved independently. Probably, the full isolation of >> the time sub-system will have much higher overhead than just offsets for >> a few clocks. And the idea that isolation of the real-time clock should >> be optional gives us another hint that offsets for monotonic and >> boot-time clocks can be implemented independently. >> >> Eric and Tomas, what do you think about this? If you agree that these >> two cases can be implemented separately, what should we do with this >> series to make it ready to be merged? >> >> I know that we need to: >> >> * look at device drivers that report timestamps in CLOCK_MONOTONIC base. > > and CLOCK_BOOTTIME and that's quite a few. > >> * forbid changing offsets after creating timers > > There are more things to think about. What about interfaces which expose > boot time or monotonic time in /proc? > > Aside of that (I finally came around to look at the series in more detail) > I'm really unhappy about the unconditional overhead once the Time namespace > config switch is enabled. This applies especially to the VDSO. We spent > quite some time recently to squeeze a few cycles out of those functions and > it would be a pity to pointlessly waste cycles for the !namespace case. > > I can see the urge for this, but please let us think it through properly > before rushing anything in which we are going to regret once we want to do > more sophisticated time domain management, e.g. support for isolated clock > real time. I'm worried, that without a clear plan about the overall > picture, we end up with duct tape which is hard to distangle after the > fact. > > There have been a few other things brought up versus time management in > general, like the TSN folks utilizing grand clock masters which expose > random time instead of proper TAI. Plus some requirements for exposing some > sort of 'monotonic' clocks which are derived from external synchronization > mechanisms, but should not affect the regular time keeping clocks. > > While different issues, these all fall into the category of separate time > domains, so taking a step back to the drawing board is probably the best > thing what we can do now. > > There are certainly a few things which can be looked at independently, > e.g. the VDSO mechanics or general mechanisms to avoid plastering the whole > kernel with these name space functions applying offsets left and right. I > rather have dedicated core functionality which replaces/amends existing > timer functions to become time namespace aware. > > I'll try to find some time in the next weeks to look deeper into that, but > I can't promise anything before returning from LPC. Btw, LPC would be a > great opportunity to discuss that. Are you and the other name space wizards > there by any chance? I will be and there are going to be both container and CRIU mini-conferences. So there should at least some of us around. Eric