From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D96CFC33CAE for ; Mon, 13 Jan 2020 21:51:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7F7C6214AF for ; Mon, 13 Jan 2020 21:51:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F7C6214AF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EB04D8E0005; Mon, 13 Jan 2020 16:51:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E39C78E0003; Mon, 13 Jan 2020 16:51:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D01018E0005; Mon, 13 Jan 2020 16:51:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0166.hostedemail.com [216.40.44.166]) by kanga.kvack.org (Postfix) with ESMTP id B59248E0003 for ; Mon, 13 Jan 2020 16:51:12 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 465BC40D3 for ; Mon, 13 Jan 2020 21:51:12 +0000 (UTC) X-FDA: 76373957184.24.shade83_278a11b97540b X-HE-Tag: shade83_278a11b97540b X-Filterd-Recvd-Size: 4740 Received: from mail-ot1-f65.google.com (mail-ot1-f65.google.com [209.85.210.65]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Mon, 13 Jan 2020 21:51:11 +0000 (UTC) Received: by mail-ot1-f65.google.com with SMTP id m2so5639652otq.3 for ; Mon, 13 Jan 2020 13:51:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ffKiZp7TgACphMkCDUm1FD5yMgsxVZ6Ff6N1urk4jWc=; b=aiqbL7mmknXffVyOcH/irQn3N+A9OZKSbKlFD1wYiJWfPNsjhjK4BK5mnoZ305HxyQ NxfUNG6irs2vh0UjscxDseOO/61iAn6RkBoFKNlv28jTVtDte1b3jN93nsd7UOEnh9IZ xFDvS9SjXgDcxoIGNO8TDbRgIlpo0s8VATAP8yftjI1/Jn1w4SbbijzjZ93+Bn4Torru kkbyMkZfSBil34m2l0+uLkjNQGYD+UsRJX4lx38NC4gVJuKHenEUw2GGI25bSEZJDsB+ n+PxKXJLv0LC3MWu2MsbzD+qLuUzVxypPOvrnsXqHokH6RAs02u8AymIvJVwIu6VhILq MuCA== X-Gm-Message-State: APjAAAX1j2EV1uSTgryy8J2uFlDTWRTA6CiaxSxLsvKW74bQA+WB5JLG BPg4teoDsi/vDFYoPD6zH/aUGJA9Sm0Lm/Qu8XQ= X-Google-Smtp-Source: APXvYqzboRxdkjdj+vWtBhL4TgciiCHxHfLR6hQIa9NC97Z5QPZwbV5+qGJCzmxQC2fQg0RpLiUiJ5XFNlHcaKaz1Xg= X-Received: by 2002:a05:6830:4b9:: with SMTP id l25mr15083303otd.266.1578952270976; Mon, 13 Jan 2020 13:51:10 -0800 (PST) MIME-Version: 1.0 References: <20200107234526.GA19034@dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com> <20200108105011.GY2827@hirez.programming.kicks-ass.net> <20200110153520.GC8214@u40b0340c692b58f6553c.ant.amazon.com> <20200113101609.GT2844@hirez.programming.kicks-ass.net> <857b42b2e86b2ae09a23f488daada3b1b2836116.camel@amazon.com> <20200113124247.GG2827@hirez.programming.kicks-ass.net> In-Reply-To: <20200113124247.GG2827@hirez.programming.kicks-ass.net> From: "Rafael J. Wysocki" Date: Mon, 13 Jan 2020 22:50:59 +0100 Message-ID: Subject: Re: [RFC PATCH V2 11/11] x86: tsc: avoid system instability in hibernation To: Peter Zijlstra Cc: "Singh, Balbir" , "Valentin, Eduardo" , "boris.ostrovsky@oracle.com" , "linux-kernel@vger.kernel.org" , "Agarwal, Anchal" , "Woodhouse, David" , "vkuznets@redhat.com" , "sstabellini@kernel.org" , "tglx@linutronix.de" , "linux-pm@vger.kernel.org" , "Woodhouse@dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com" , "linux-mm@kvack.org" , "jgross@suse.com" , "pavel@ucw.cz" , "axboe@kernel.dk" , "x86@kernel.org" , "roger.pau@citrix.com" , "hpa@zytor.com" , "rjw@rjwysocki.net" , "mingo@redhat.com" , "Kamata, Munehisa" , "bp@alien8.de" , "netdev@vger.kernel.org" , "konrad.wilk@oracle.co" , "len.brown@intel.com" , "davem@davemloft.net" , "fllinden@amaozn.com" , "xen-devel@lists.xenproject.org" Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jan 13, 2020 at 1:43 PM Peter Zijlstra wrote: > > On Mon, Jan 13, 2020 at 11:43:18AM +0000, Singh, Balbir wrote: > > For your original comment, just wanted to clarify the following: > > > > 1. After hibernation, the machine can be resumed on a different but compatible > > host (these are VM images hibernated) > > 2. This means the clock between host1 and host2 can/will be different > > > > In your comments are you making the assumption that the host(s) is/are the > > same? Just checking the assumptions being made and being on the same page with > > them. > > I would expect this to be the same problem we have as regular suspend, > after power off the TSC will have been reset, so resume will have to > somehow bridge that gap. I've no idea if/how it does that. In general, this is done by timekeeping_resume() and the only special thing done for the TSC appears to be the tsc_verify_tsc_adjust(true) call in tsc_resume(). > I remember some BIOSes had crazy TSC ideas for suspend2ram, and we grew > tsc_restore_sched_clock_state() for it. > > Playing crazy games like what you're doing just isn't it though. Right.