Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp624340imu; Fri, 11 Jan 2019 06:23:23 -0800 (PST) X-Google-Smtp-Source: ALg8bN4W4hm5WXhHyjggtvKFiuOR9Dn1DaEApFE9Id6twdc3Lux5SUa9JcdncuHTyVrF/lQt+q7+ X-Received: by 2002:a63:9306:: with SMTP id b6mr13036744pge.36.1547216603649; Fri, 11 Jan 2019 06:23:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547216603; cv=none; d=google.com; s=arc-20160816; b=R8+wiPrk/BqyXIcHvbLLlqM4j5AXJFhj5qbuiZIEUWAPYo3iwUskGovqilZXVScFal hGU9b6xA1p4Y3SRaEXqJg7pwjoPTeRDqE8kGz+Vfysit87DQC6PnkC/j7MSMLSrIWdVz SGC8uFWEDSUrjPY//GySq6cRvIgIpxjYMFXg7dZ/r8qCwxyLA/y3xPc4odVhhkdU7XYW VD19Hp4KG0Xrsxkztm8rya7cdxVA4s3RBUrGGMvKXSyae7v1JItE2HoET8O8chP4gSwS aen686uNwsHMTwPG+PfaG5uaB4Fs0JgVtXohhWy/kWUQK5T/3KMVFQCoXQOXK/28AJ7y EP4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=eRyGOzHN74Oe1B6i43070AmA96x+cMW3ArHn/+c5KAo=; b=S2MAAtOBiUJCQgogNTi3F9Xc6nxkPUa698lQ3lCwcZUYYtEwHiUrV54EijfoEIMmpj ahltCCADvgxd5owKXhSAWqU4IfTLSo2qbkJLJH3nbdKWO6Bv53YoKtR1AjmtpJe+8pHT xPwUusYeWsTPmmj9CUiaiaYNsVU7QLPuMUv6bAHPSAo3EIpolUZH7KYwQiZX9bxODA1M 3xikyIe0gdalOytDeTG7jhnJunQG6hLTOYPjH6QU0+7NUh/ZsSKtkGdwyfVHB0W5KaPL lMd7Hq+W6TPzXFvql1GSLL7ATzTTEQJ1XAb8CHTSxKHwEd7Db3bLSD+jBGzmUheaK1k/ j9UQ== 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 l7si8836824pfg.245.2019.01.11.06.23.08; Fri, 11 Jan 2019 06:23:23 -0800 (PST) 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 S1732990AbfAKOBP (ORCPT + 99 others); Fri, 11 Jan 2019 09:01:15 -0500 Received: from mx2.suse.de ([195.135.220.15]:39468 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725803AbfAKOBO (ORCPT ); Fri, 11 Jan 2019 09:01:14 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 90185AD7F; Fri, 11 Jan 2019 14:01:12 +0000 (UTC) Subject: Re: [Xen-devel] [PATCH v2] xen: Fix x86 sched_clock() interface for xen To: Hans van Kranenburg , linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, x86@kernel.org Cc: sstabellini@kernel.org, stable@vger.kernel.org, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, boris.ostrovsky@oracle.com, tglx@linutronix.de References: <20190111120805.24852-1-jgross@suse.com> <74aafdff-c7d5-b9aa-c3fb-3787d36c7bbe@knorrie.org> From: Juergen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N6UOGyTH2B3p hRQUWqCwu2sqkI3LLbTdrnyDZaixT2T0f4tyF5Lfs+Ha8xVMhIyzNb1byDI5FKCb Message-ID: <8ec039c6-d0fc-c7f4-72a4-ae677c9bbb68@suse.com> Date: Fri, 11 Jan 2019 15:01:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <74aafdff-c7d5-b9aa-c3fb-3787d36c7bbe@knorrie.org> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/01/2019 14:12, Hans van Kranenburg wrote: > Hi, > > On 1/11/19 1:08 PM, Juergen Gross wrote: >> Commit f94c8d11699759 ("sched/clock, x86/tsc: Rework the x86 'unstable' >> sched_clock() interface") broke Xen guest time handling across >> migration: >> >> [ 187.249951] Freezing user space processes ... (elapsed 0.001 seconds) done. >> [ 187.251137] OOM killer disabled. >> [ 187.251137] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done. >> [ 187.252299] suspending xenstore... >> [ 187.266987] xen:grant_table: Grant tables using version 1 layout >> [18446743811.706476] OOM killer enabled. >> [18446743811.706478] Restarting tasks ... done. >> [18446743811.720505] Setting capacity to 16777216 >> >> Fix that by setting xen_sched_clock_offset at resume time to ensure a >> monotonic clock value. >> >> [...] > > I'm throwing around a PV domU over a bunch of test servers with live > migrate now, and in between the kernel logging, I'm seeing this: > > [Fri Jan 11 13:58:42 2019] Freezing user space processes ... (elapsed > 0.002 seconds) done. > [Fri Jan 11 13:58:42 2019] OOM killer disabled. > [Fri Jan 11 13:58:42 2019] Freezing remaining freezable tasks ... > (elapsed 0.000 seconds) done. > [Fri Jan 11 13:58:42 2019] suspending xenstore... > [Fri Jan 11 13:58:42 2019] ------------[ cut here ]------------ > [Fri Jan 11 13:58:42 2019] Current state: 1 > [Fri Jan 11 13:58:42 2019] WARNING: CPU: 3 PID: 0 at > kernel/time/clockevents.c:133 clockevents_switch_state+0x48/0xe0 > [Fri Jan 11 13:58:42 2019] Modules linked in: > [Fri Jan 11 13:58:42 2019] CPU: 3 PID: 0 Comm: swapper/3 Not tainted > 4.19.14+ #1 > [Fri Jan 11 13:58:42 2019] RIP: e030:clockevents_switch_state+0x48/0xe0 > [Fri Jan 11 13:58:42 2019] Code: 8b 0c cd 40 ee 00 82 e9 d6 5b d1 00 80 > 3d 8e 8d 43 01 00 75 17 89 c6 48 c7 c7 92 62 1f 82 c6 05 7c 8d 43 01 01 > e8 f8 22 f8 ff <0f> 0b 5b 5d f3 c3 83 e2 01 74 f7 48 8b 47 48 48 85 c0 > 74 69 48 89 > [Fri Jan 11 13:58:42 2019] RSP: e02b:ffffc90000787e30 EFLAGS: 00010082 > [Fri Jan 11 13:58:42 2019] RAX: 0000000000000000 RBX: ffff88805df94d80 > RCX: 0000000000000006 > [Fri Jan 11 13:58:42 2019] RDX: 0000000000000007 RSI: 0000000000000001 > RDI: ffff88805df963f0 > [Fri Jan 11 13:58:42 2019] RBP: 0000000000000004 R08: 0000000000000000 > R09: 0000000000000119 > [Fri Jan 11 13:58:42 2019] R10: 0000000000000020 R11: ffffffff82af4e2d > R12: ffff88805df9ca40 > [Fri Jan 11 13:58:42 2019] R13: 0000000dd28d6ca6 R14: 0000000000000000 > R15: 0000000000000000 > [Fri Jan 11 13:58:42 2019] FS: 00007f34193ce040(0000) > GS:ffff88805df80000(0000) knlGS:0000000000000000 > [Fri Jan 11 13:58:42 2019] CS: e033 DS: 002b ES: 002b CR0: 0000000080050033 > [Fri Jan 11 13:58:42 2019] CR2: 00007f6220be50e1 CR3: 000000005ce5c000 > CR4: 0000000000002660 > [Fri Jan 11 13:58:42 2019] Call Trace: > [Fri Jan 11 13:58:42 2019] tick_program_event+0x4b/0x70 > [Fri Jan 11 13:58:42 2019] hrtimer_try_to_cancel+0xa8/0x100 > [Fri Jan 11 13:58:42 2019] hrtimer_cancel+0x10/0x20 > [Fri Jan 11 13:58:42 2019] __tick_nohz_idle_restart_tick+0x45/0xd0 > [Fri Jan 11 13:58:42 2019] tick_nohz_idle_exit+0x93/0xa0 > [Fri Jan 11 13:58:42 2019] do_idle+0x149/0x260 > [Fri Jan 11 13:58:42 2019] cpu_startup_entry+0x6a/0x70 > [Fri Jan 11 13:58:42 2019] ---[ end trace 519c07d1032908f8 ]--- > [Fri Jan 11 13:58:42 2019] xen:grant_table: Grant tables using version 1 > layout > [Fri Jan 11 13:58:42 2019] OOM killer enabled. > [Fri Jan 11 13:58:42 2019] Restarting tasks ... done. > [Fri Jan 11 13:58:42 2019] Setting capacity to 6291456 > [Fri Jan 11 13:58:42 2019] Setting capacity to 10485760 > > This always happens on every *first* live migrate that I do after > starting the domU. Yeah, its a WARN_ONCE(). And you didn't see it with v1 of the patch? On the first glance this might be another bug just being exposed by my patch. I'm investigating further, but this might take some time. Could you meanwhile verify the same happens with kernel 5.0-rc1? That was the one I tested with and I didn't spot that WARN. Juergen