Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp942166imm; Mon, 1 Oct 2018 23:17:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV60xpw4u9cNmvSBY1IQ8j4VvDA3f1aAYxnKERyWzYSojQLuyLeykTaAFoT2QdZrVoc7wV+Mq X-Received: by 2002:a17:902:2e83:: with SMTP id r3-v6mr15372430plb.80.1538461059015; Mon, 01 Oct 2018 23:17:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538461058; cv=none; d=google.com; s=arc-20160816; b=KgedaDPDi4O+3ObaCwAhPkM4kAVntxb2YFd9/zMmYdiOTh/8kZki8NoQxe3HMAnFHV na4RwlMUdX2BmGZCa2NSSF6OXfbJRlOXMgu3xLLN+pj+dJE//RPvW3ya/g6IBPvbcEFQ h1RohQ3+FPXXx3WtLipGi+GQcoEZvertEp7Cs9Q82JgAj/gq5M72UlnS1Xy5pWFtr5om Y2zyIzSvPd4/73gqptmcN50sX5W2BgEBsVr26gmvEFEmh6f91upMnB3eU42NEDAbBTBR uzTAlfVcqePbYzdlqqJ2XwPNjIXlnGlsn91RZ6Q2RjWQpCPXY3bu7+4XqxogRvwY10xU 3aag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=fE4q3T4xXE2Gfe7ciiujsrx8Lih8mox5YzgzTiTrBCs=; b=BVbscxJ7ltVBeidUjR0bfS1wxO0d+5Cq8R1fspk6J429cC7cx6i486HyY3O/wkUU74 5aP+1OBbA2jd6DkG4dGvQIFoKfVEMLJtWZyLSXYU5N+mtY8Ip+WtvyRyTFDgdMvdZ1R4 1HvGcffWKEJzo72EZLeUKTaxmhCFotMADgc2cysrAf+BLrZTznuSXfmmur0qmhtLbN6o ETaKXjHpQRKCogcDu/Tt0gu18qobwt9DfpwgeCjEYST1gTHqs0wV6GXCUa1+kNnk8rLE mdOfaRAHZ9KkbXDqliq2kgqSsa7LYSkoeJpORBQk2QQrjZ5+AIJvhU403/iUr8XAnGC/ 4YBw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d21-v6si14647539pfd.114.2018.10.01.23.17.24; Mon, 01 Oct 2018 23:17:38 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726964AbeJBM6i (ORCPT + 99 others); Tue, 2 Oct 2018 08:58:38 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:58869 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726772AbeJBM6h (ORCPT ); Tue, 2 Oct 2018 08:58:37 -0400 Received: from p5492e4c1.dip0.t-ipconnect.de ([84.146.228.193] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1g7Dz4-0002ki-OR; Tue, 02 Oct 2018 08:16:38 +0200 Date: Tue, 2 Oct 2018 08:16:38 +0200 (CEST) From: Thomas Gleixner To: Andrey Vagin cc: "Eric W. Biederman" , Dmitry Safonov , "linux-kernel@vger.kernel.org" , Dmitry Safonov <0x7f454c46@gmail.com>, Adrian Reber , Andy Lutomirski , Christian Brauner , Cyrill Gorcunov , "H. Peter Anvin" , Ingo Molnar , Jeff Dike , Oleg Nesterov , Pavel Emelianov , Shuah Khan , "containers@lists.linux-foundation.org" , "criu@openvz.org" , "linux-api@vger.kernel.org" , "x86@kernel.org" , Alexey Dobriyan , "linux-kselftest@vger.kernel.org" Subject: Re: Setting monotonic time? In-Reply-To: <20181001205124.GA23620@outlook.office365.com> Message-ID: 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> <877ej2xc23.fsf_-_@xmission.com> <20181001205124.GA23620@outlook.office365.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 1 Oct 2018, Andrey Vagin wrote: > On Mon, Oct 01, 2018 at 11:15:32AM +0200, Eric W. Biederman wrote: > > > > In the context of process migration there is a simpler subproblem that I > > think it is worth exploring if we can do something about. > > > > For a cluster of machines all running with synchronized > > clocks. CLOCK_REALTIME matches. CLOCK_MONOTNIC does not match between > > machines. Not having a matching CLOCK_MONOTONIC prevents successful > > process migration between nodes in that cluster. > > > > Would it be possible to allow setting CLOCK_MONOTONIC at the very > > beginning of time? So that all of the nodes in a cluster can be in > > sync? > > Here is a question about how to synchronize clocks between nodes. It > looks like we will need to have a working network for this, but a > network configuration may be non-trivial and it can require to run a few > processes which can use CLOCK_MONOTNIC... > > > > > No change in skew just in offset for CLOCK_MONOTONIC. > > > > There are also dragons involved in coordinating things so that > > CLOCK_MONOTONIC gets set before CLOCK_MONOTONIC gets used. So I don't > > know if allowing CLOCK_MONOTONIC to be set would be practical but it > > seems work exploring all on it's own. > > > > Dmitry would setting CLOCK_MONOTONIC exactly once at boot time solve > > your problem that is you are looking at a time namespace to solve? > > Process migration is only one of use-cases. Another use-case is > restoring from snapshots. It may be even more popular than process > migration. We can't guarantee that all snapshots will be done in one > cluster. For example, a user meets a bug, does a container snapshot and > attaches it to a bug report. Sure, but see my reply to Eric. That could be solved with that extra clock id, which then gets mapped to monotonic for name spaces. Thanks, tglx