Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp6287563imd; Wed, 31 Oct 2018 09:27:36 -0700 (PDT) X-Google-Smtp-Source: AJdET5dYKtORYstxwsF4XtGWT9o87O3M3SyQ1sevtq4Qv1raBt/Xnp2BVvEDM4x98X72qf9KlG01 X-Received: by 2002:a63:e818:: with SMTP id s24-v6mr3716145pgh.90.1541003256231; Wed, 31 Oct 2018 09:27:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541003256; cv=none; d=google.com; s=arc-20160816; b=E3TvC75odjhSB47hYicf3LMtjR7AKEskMR8NhCBHlwNWE8hEmC+oYyr/BDmQrpQ0EB RlKmDc1KS5Tbf3Mq0ZRLmIfKrOqRtOH2dV7cBEeCOn5ROTa/u6qpcwS8JY85o64edm56 06Cu0Im6egS5y06AQ9Ou4UM5zvndD/u9E7azVso3tpdsZB6yvymS+mHE6p55f9udDYUz I6S+nTlB+DcVTcjV/hC+k75iK8v9Quyxm5ziZ8Hbj4Rw074Eiu6gLqi92D/xpg2FkSFx XTpEX99XEpOMJO3Ov+4KrixYnXAW2SQ8GKsMXpvwRiuUuFcslCbs+c8AD8DG4tddBV09 vMNg== 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=tjScDnCkVYgtVc9va2dtzEbLAtOhqWoRkPUVl2J9p5Y=; b=haMie2+TvN2FaqAh7kH5RuJ6C+vpb66Gm5UVMTTUfyUgUEvp3/f+tjgkcE76RNRd9x qAj8OhT3JTnG22P2LgqD5JjGrnRce5/9NhkWRLw2bX1kDybFrLvjV+hhg2+CYBgWT4FO 4fyypqMRkElNzfX6UpTHBoNfZPLyV8KJl2pF0SbyVlqY36PyF0W0tiGCg2BCUFq+6A+n d8SD0ZY+plvUpf50gvrvqoc7+AgccHf5oVCAZwe6mbDGaODiC2oWYMDfWXuOd1wpOVO0 23E7tw75YM+Yijyvz9X0FkiYIQ/GlPQ0n/nZ1LdbKAlrZzqyvrNbv/TiU9gQoAu831d4 qUrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jnur5nrD; 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 d82-v6si14559340pfe.190.2018.10.31.09.27.20; Wed, 31 Oct 2018 09:27:36 -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=jnur5nrD; 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 S1729575AbeKABZk (ORCPT + 99 others); Wed, 31 Oct 2018 21:25:40 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:33904 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726720AbeKABZk (ORCPT ); Wed, 31 Oct 2018 21:25:40 -0400 Received: by mail-pg1-f194.google.com with SMTP id k1-v6so6202246pgq.1; Wed, 31 Oct 2018 09:26:57 -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=tjScDnCkVYgtVc9va2dtzEbLAtOhqWoRkPUVl2J9p5Y=; b=jnur5nrDRl3mpJ15jQCJDR8muXAqxaAQQNtubcMdFPCMP1gXnJTVKT1r6KO7cScy24 kL+I2GGaFwFlSjRrpm4fP1G8sDqj+nHJtdgwFyGRqOdbKwRalSS6IH/BfVARhYT4VbQo WZUSJ56GXWBF2liKTRYKT3bLL92MPcBZQI+PoLK9fk07W+d4q+ekHtPPfD8QbNtAi7pi WqczxdScA4+4orn1c3d+86S+TdlM/j2y1pReAl3z4cKa0zftyjxvWCey5yPOucKOG+ym DziSK/PhAfVDG+uGD6rblb7SI+CL85hm4omE4Ofh7iaUrBU+eFxVrJE5SF0Vpu85ik8n 6COA== 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=tjScDnCkVYgtVc9va2dtzEbLAtOhqWoRkPUVl2J9p5Y=; b=pqP6RtvcZxAWYMNIkLz++43JiQ72LA2phW9ruJHQ/wPUwWpdY7gxZbZ2NAvqxAx34Z 5ppSzqgpyHc7K0kgWjGhw1gz0mEoTIlIfO/j4wii3cRP6lLjF7My7hTSeSM8ZDa1ChYJ 7L252bmY+QraxUe4PwIndhoCwLAdzC35bvtjsS46yBHpKA0xipHYsTou4BLPkkXijTQC JPRelt76iPfF32pGetUCpI3X11sA/YRoTFZgCBn6tpXcF2z7/0vzQwfMsbctqehdCG98 /r0CLYCrcRSFbTTDzGLEtZY+D7MgALl8u0nUmvBQi/G+tMX+cFYMRfYJ2LGcyTRye2Bg vQyQ== X-Gm-Message-State: AGRZ1gIZ9+PbhOpAbhOiyf5mFEByVkqbGX/mpQOoegmR6CxH0ZJf/TX3 JCKNCo519r/riMoJmAK2q78= X-Received: by 2002:a63:164d:: with SMTP id 13-v6mr3812640pgw.103.1541003216751; Wed, 31 Oct 2018 09:26:56 -0700 (PDT) Received: from gmail.com ([2620:0:1008:fd00:78b4:3a07:980a:287b]) by smtp.gmail.com with ESMTPSA id q76-v6sm59765465pfa.18.2018.10.31.09.26.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 09:26:56 -0700 (PDT) Date: Wed, 31 Oct 2018 09:26:53 -0700 From: Andrei Vagin To: Thomas Gleixner Cc: "Eric W. Biederman" , "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 Subject: Re: [RFC 00/20] ns: Introduce Time Namespace Message-ID: <20181031162650.GB26067@gmail.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 29, 2018 at 09:33:14PM +0100, Thomas Gleixner wrote: > 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? We didn't find any proc files where boot or monotonic time is reported, but we will double check this. > > 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. It is a good point. We will work on it. > > 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. Thomas, there is no rush at all. This functionality is critical for CRUI, but we have enough time to solve it properly. The only thing what I want is that this functionality continues moving forward and will not be put in the back burner. > > 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? Dmitry and I are going to be there. Thanks! Andrei > > Thanks, > > tglx > >