Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp520091imm; Mon, 1 Oct 2018 13:52:03 -0700 (PDT) X-Google-Smtp-Source: ACcGV63ZPe/T4ebSMbyGEiN4W2K+PgzqcKqPozH7owBabnf8qu7XtkzQPAxFV1alGArjsugMGA+w X-Received: by 2002:a63:1947:: with SMTP id 7-v6mr11782763pgz.192.1538427123591; Mon, 01 Oct 2018 13:52:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538427123; cv=none; d=google.com; s=arc-20160816; b=fiSZx+l8Aq54ViykQHOVEPnvZ1HKbceix5HuctzTU27HBbE1RCTyQrx7UTkWXeP6dv jOtDHNK9r+m10JvuGGVjq9weePUfFI5Zyb1zyVOQ/PiN/q9ttyxQ0HXTcFeB/dRiYufF iJQ/Tb49DxD8jqRVOjvFYVPNEWJODCK9beCr+P3MXZGUEqU/haeIi4AQeg+UP4JdgDm3 coWBW8SZschEZyA3QRFt0cF0H22dyo0vOFxV8XQgJcnOfXgTUai8539BjpHJvN5u4UYA NNcTFP51emfuFvTkwdyJ4NJjpsRvcVSq3VAhIh2ofCMFJX0w3o4zhWDycFXTP9PjtnuN lwJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:spamdiagnosticmetadata:spamdiagnosticoutput:user-agent :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=f0smYRLId2SHamY3P1USvta7IEEEvQqwBXdBLlcgu9Y=; b=K40jEgckKsNcko1HWRmxjZbQtRAfyDdyfY5WIeq0mGDD5fQ43YnN6w//da8U+RIRjH wiME6y5TUc6xsrJUxZVXLdF+bea5qk1HNqwaJm6xPJJEOBpzMSBlLxcpAQ9JIFeEVHFk 5PLfwgCM6oYYmIGe/hFNdCjimCEscYC4mBZGfthJkAM+TaYFIxKYEgiF19ZKI++91BIT Rm+6WM0ENDmtZ32X2t/eCRVyTEua9fnHQXGVmqLVEh7xWUMVB2ZgMNZNrZwGUcyANp7G pwlSTZ0VH9b9tVVefgicIfo3cpERX7X1hxgEUgU9abg7DQhpzF2JSTRhY3XH5B9OVFku BgOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=JLzlPYOK; 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=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k185-v6si13075548pgk.183.2018.10.01.13.51.48; Mon, 01 Oct 2018 13:52:03 -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=@virtuozzo.com header.s=selector1 header.b=JLzlPYOK; 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=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726349AbeJBDbU (ORCPT + 99 others); Mon, 1 Oct 2018 23:31:20 -0400 Received: from mail-eopbgr60104.outbound.protection.outlook.com ([40.107.6.104]:31923 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726149AbeJBDbU (ORCPT ); Mon, 1 Oct 2018 23:31:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f0smYRLId2SHamY3P1USvta7IEEEvQqwBXdBLlcgu9Y=; b=JLzlPYOKWBBWfkqyRoejGatv4LTUJYY8R7UU/8T0Gcbr5tzd8gBcTVDIqn7bcH3xg9wuZZbzufT8WmwL5+UHA0Oy7LvWPaF4QZad3UJsh4KfhqMOv9W7EHVm5RHRwEfDl4bWgaDxl8YDK+dBmGjEM0UUAZ5UdozgYAC5EGHYePo= Received: from AM6PR08MB3253.eurprd08.prod.outlook.com (52.135.164.146) by AM6PR08MB3352.eurprd08.prod.outlook.com (52.135.165.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.22; Mon, 1 Oct 2018 20:51:37 +0000 Received: from AM6PR08MB3253.eurprd08.prod.outlook.com ([fe80::a458:ca6c:fe4e:fc39]) by AM6PR08MB3253.eurprd08.prod.outlook.com ([fe80::a458:ca6c:fe4e:fc39%4]) with mapi id 15.20.1185.024; Mon, 1 Oct 2018 20:51:37 +0000 From: Andrey Vagin To: "Eric W. Biederman" CC: Thomas Gleixner , 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? Thread-Topic: Setting monotonic time? Thread-Index: AQHUWWdaiE2peLl8zUKo0W79mOHGKaUK3jqA Date: Mon, 1 Oct 2018 20:51:36 +0000 Message-ID: <20181001205124.GA23620@outlook.office365.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> <877ej2xc23.fsf_-_@xmission.com> In-Reply-To: <877ej2xc23.fsf_-_@xmission.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mutt/1.10.0 (2018-05-17) x-originating-ip: [2620:0:1000:fd1f:f3f3:aec8:82f8:da4d] x-clientproxiedby: DM5PR16CA0011.namprd16.prod.outlook.com (2603:10b6:3:c0::21) To AM6PR08MB3253.eurprd08.prod.outlook.com (2603:10a6:209:47::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=avagin@virtuozzo.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM6PR08MB3352;20:uvgSXk+mm0tuUcMaYz095hZ5GIOxUHeZxCO4ATvnwt7UvluElRiLhIVdrQ1K675Yi6j2RC0K2oL0tWZZhV2TKABOvudp9vUL8oPtOIU117g57Wo6N3kpdHy/kQzt9mGm1KHcrRXbu/LGzdV5DmTpQ7+pAV3FRnxygZRLvCACsv4= x-ms-office365-filtering-correlation-id: 5f9be4c6-d64f-4ec2-71f9-08d627dfad98 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:AM6PR08MB3352; x-ms-traffictypediagnostic: AM6PR08MB3352: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231355)(944501410)(52105095)(10201501046)(3002001)(149066)(150057)(6041310)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051);SRVR:AM6PR08MB3352;BCL:0;PCL:0;RULEID:;SRVR:AM6PR08MB3352; x-forefront-prvs: 0812095267 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39850400004)(376002)(346002)(136003)(366004)(199004)(189003)(316002)(6506007)(5250100002)(3480700004)(8936002)(386003)(81166006)(81156014)(8676002)(14454004)(105586002)(102836004)(7736002)(54906003)(7416002)(305945005)(33656002)(106356001)(58126008)(52116002)(2906002)(76176011)(99286004)(6116002)(68736007)(2900100001)(6436002)(46003)(6916009)(6246003)(6512007)(4326008)(1076002)(446003)(11346002)(486006)(478600001)(7116003)(256004)(97736004)(476003)(39060400002)(229853002)(5660300001)(6486002)(53936002)(93886005)(25786009)(186003)(9686003)(33896004)(5024004)(86362001)(71190400001)(71200400001)(18370500001);DIR:OUT;SFP:1102;SCL:1;SRVR:AM6PR08MB3352;H:AM6PR08MB3253.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: TWrMxhZ5Lgm7Pyalf2NElgDzjWD3CCNlTMpII//c3SAIFFgj/gJlsGzlroV8tvoN2tY05y8MTu5h2+CFlDL67kfJDbksimaMxNA3Xg8+n+Hhg9w/AZUYifYZQx7DyVCnLR/txCTa/N6nzDKrGpZvn6zj2t1JeYgWd07f7Y+jKGWK4gOZ6QJ1tCCHPyQ4xO1lJCq8uxYSFjR17X9oPGD/hfT4ZteuwvoyPDwdrwRfD5vJSIbwsjDMEbF7bZ14W3RDd904sw4+YF5P09E7B/AOjUbRhRfmSjccDhogerKRcRzBOML9QAxcKfiiAa5ViL/WVdQ9AFrMxYEnva/c5F40c0Hya5byGeJNxToE8xP3qYo= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="koi8-r" Content-ID: <72741018C87A6A4F880EEF1058CBD8DC@eurprd08.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5f9be4c6-d64f-4ec2-71f9-08d627dfad98 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Oct 2018 20:51:36.8957 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3352 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 01, 2018 at 11:15:32AM +0200, Eric W. Biederman wrote: >=20 > In the context of process migration there is a simpler subproblem that I > think it is worth exploring if we can do something about. >=20 > 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. >=20 > 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... >=20 > No change in skew just in offset for CLOCK_MONOTONIC. >=20 > 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. >=20 > 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. >=20 > Eric