Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp252452imm; Tue, 24 Jul 2018 18:25:18 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdaOYYXyRkdg9m1FUuXYiWgjykg3ksNBf/lkO8vvanUZ13sLZXUo60k1Qp9NWZsbnwcjXV3 X-Received: by 2002:a17:902:904c:: with SMTP id w12-v6mr4122784plz.95.1532481918787; Tue, 24 Jul 2018 18:25:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532481918; cv=none; d=google.com; s=arc-20160816; b=fWRSzlTIjEFGlkT16l3vlq7uIlCccNnjpjhg7od5aiaTA4YDzNt9eLXb6jbXn4pZLX lRtBC5MT1NdjvvJwOES++KuNGzJvw5LigaePN/2hEEH7xJZVBuXQb3iBssvbAiG8QwdX WOJiqo0jBTtbRKOeu27ARRyyEHqZtuF/pI/PwUqD0Xmn2OICD3eu7T+JlmKeha0xhC7t PKT9B5iIx0tBvnll+p+tmAbWYDbKQC4rWk904Fh7MqxaKJ5FGKxSfXUwpcFpXEBNOAEO HDNV2I0MK8DusJOeH432UJ/bsskworyo25CnaYg04NsewuH6v++OUYs5/Bv/O4LHDJtB zYhg== 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:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=wSYMbmQOq0ldFH/jCYnPG3IXkyS/SX7hJyGMcbYXKLA=; b=OVdrc34Mu6R+l8V+2sWbVqqSNBLyvTjwgUGopouBRg8yfesFcQ7n/0dTt6KSK02e74 MeKaLd9upCSbIyVGg0WySbMmQqTklqzcmUuA6SrQ8xsbM62VOizeOrpzk0kbXJ4ds6oG fAMGNN/dq6++BO/WO8nGMdYcTjGxuebsRFG+tvmmcrNIukaL8QoYzXTCAgGt1qMMB3Aq Rq6+NoOiv+z8HnzTIchC6bmbiYD1nTDKOD3Rb4Vmo3s5fUxXdAWOwlLw3uma1htQfgMD MdVC4hA5YI+6oieEQGifo7/F88NKL9UU+cyburwqCUV7Pob6+ddjgbksnMH7u+teLMuN VSkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=WLFt7jmh; 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 g12-v6si12405674pfh.346.2018.07.24.18.25.03; Tue, 24 Jul 2018 18:25:18 -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=fail header.i=@gmail.com header.s=20161025 header.b=WLFt7jmh; 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 S2388562AbeGYCdZ (ORCPT + 99 others); Tue, 24 Jul 2018 22:33:25 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:45218 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388468AbeGYCdZ (ORCPT ); Tue, 24 Jul 2018 22:33:25 -0400 Received: by mail-pg1-f196.google.com with SMTP id f1-v6so4090929pgq.12; Tue, 24 Jul 2018 18:24:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=wSYMbmQOq0ldFH/jCYnPG3IXkyS/SX7hJyGMcbYXKLA=; b=WLFt7jmh4vXmajvVhVto4FKTFw2srQ2y3tt3xf/hlPfF5MnKpzb2d+fFUF3g/1ufB4 qC5qilwMK+hp1dmNwOdAoy2fKIuE2xs+72UeABFWZamqAZj04+zw4e1wWnVOKdvLkeLg rxpCa1TEDCS/sSEF7KYVw5peC0CvcZQL7GoX43tLkOQIOQ+ZJLOKratQdaI+ayxBRAzz dBrIdNb1jm4+JkjDiNB+T6ThgdfWiwvYLIQ/3NlLqzVEs4p2vOZQA7sUHtkNDPhOGuSB LNP8RkSNUjHJ0PomDkvIHxML1kFkzPqdEznoeH+s8AkC9BO5zU4bFuiY0QHuBqhaGt+J 8B6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=wSYMbmQOq0ldFH/jCYnPG3IXkyS/SX7hJyGMcbYXKLA=; b=iZC/Wngfc2bElGXGVGmQJseb3LAJyJ9lMsMetoKHoWiO1HEwRi73y5jIBuuJ5XXRcJ e3ZOrw9hyFIL5u3upRlqpLfEcMupiZBf1a3fHS0NH6cT6SzMzF7APP5Rdr8em29fc773 IHudtA1PfYi3ZlkNzIwIPMoQttv9IukQ4hxRKqeQApl6JtCkdf5iHCwBYD93dvPJAFAm ePFl+4CbYleOqepMIt9D9/zO2mW3KbxZbKffUrxYpWhsjHo/1IcmR73eCZG6/lVd48WP M8IdQRRPFL0Oa31TFSHHlx6KLq1obP0yJTuJLjtkk3Y6xRt133IwcOTHOL57C47Rkvre USbw== X-Gm-Message-State: AOUpUlHs7l5YUx5Xfj/WIHKgEuTjDverOdJ42td+B39IC1DKJrCVynon /DGCYL6bh2sO/drnhqHViFPLTVXX X-Received: by 2002:a63:f18:: with SMTP id e24-v6mr18629825pgl.320.1532481853052; Tue, 24 Jul 2018 18:24:13 -0700 (PDT) Received: from server.roeck-us.net (108-223-40-66.lightspeed.sntcca.sbcglobal.net. [108.223.40.66]) by smtp.gmail.com with ESMTPSA id j1-v6sm40558754pfk.125.2018.07.24.18.24.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jul 2018 18:24:12 -0700 (PDT) Subject: Re: [tip:x86/timers] sched/clock: Enable sched clock early To: Pavel Tatashin Cc: LKML , mingo@kernel.org, tglx@linutronix.de, hpa@zytor.com, linux-tip-commits@vger.kernel.org References: <20180719205545.16512-24-pasha.tatashin@oracle.com> <20180724195215.GA22496@roeck-us.net> From: Guenter Roeck Message-ID: Date: Tue, 24 Jul 2018 18:24:11 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/24/2018 05:36 PM, Pavel Tatashin wrote: > On Tue, Jul 24, 2018 at 4:22 PM Pavel Tatashin > wrote: >> >> On Tue, Jul 24, 2018 at 3:54 PM Guenter Roeck wrote: >>> >>> Hi, >>> >>> On Thu, Jul 19, 2018 at 03:33:21PM -0700, tip-bot for Pavel Tatashin wrote: >>>> Commit-ID: 857baa87b6422bcfb84ed3631d6839920cb5b09d >>>> Gitweb: https://git.kernel.org/tip/857baa87b6422bcfb84ed3631d6839920cb5b09d >>>> Author: Pavel Tatashin >>>> AuthorDate: Thu, 19 Jul 2018 16:55:42 -0400 >>>> Committer: Thomas Gleixner >>>> CommitDate: Fri, 20 Jul 2018 00:02:43 +0200 >>>> >>>> sched/clock: Enable sched clock early >>>> >>>> Allow sched_clock() to be used before schec_clock_init() is called. This >>>> provides a way to get early boot timestamps on machines with unstable >>>> clocks. >>>> >>> >>> This patch causes a regression when running a qemu emulation with >>> arm:integratorcp. >> >> Thank you for the report. I will study it. >> >>> >>> ... >>> Console: colour dummy device 80x30 >>> ------------[ cut here ]------------ >>> WARNING: CPU: 0 PID: 0 at kernel/time/sched_clock.c:180 >>> sched_clock_register+0x44/0x278 >>> Modules linked in: >>> CPU: 0 PID: 0 Comm: swapper Not tainted 4.18.0-rc6-next-20180724 #1 >>> Hardware name: ARM Integrator/CP (Device Tree) >>> [] (unwind_backtrace) from [] (show_stack+0x10/0x18) >>> [] (show_stack) from [] (dump_stack+0x18/0x24) >>> [] (dump_stack) from [] (__warn+0xc8/0xf0) >>> [] (__warn) from [] (warn_slowpath_null+0x3c/0x4c) >>> [] (warn_slowpath_null) from [] (sched_clock_register+0x44/0x278) >>> [] (sched_clock_register) from [] (generic_sched_clock_init+0x28/0x88) >>> [] (generic_sched_clock_init) from [] (sched_clock_init+0x54/0x74) >>> [] (sched_clock_init) from [] (start_kernel+0x310/0x3e4) >>> [] (start_kernel) from [<00000000>] ( (null)) >>> ---[ end trace 08080eb81afa002c ]--- >>> sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns >>> ... >>> >>> A complete boot log is available at >>> http://kerneltests.org/builders/qemu-arm-next/builds/979/steps/qemubuildcommand/logs/stdio >>> >>> Unfortunately, reverting the patch results in conflicts, so I am unable >>> to confirm that it is the only culprit. >>> >>> From the context and from looking into the patch, it appears that this >>> can happen in any system if CONFIG_HAVE_UNSTABLE_SCHED_CLOCK is not >>> enabled. > > Do you have a complete config, and also qemu args that were used? I > have tried defconfig arm, and run in qemu, could not reproduce the > problem. > integrator_defconfig+CONFIG_DEVTMPFS=y+CONFIG_DEVTMPFS_MOUNT=y Qemu command line is qemu-system-arm -M integratorcp -m 128 \ -kernel arch/arm/boot/zImage -no-reboot \ -initrd busybox-armv4.cpio \ --append "rdinit=/sbin/init console=ttyAMA0,115200" \ -serial stdio -monitor null -nographic \ -dtb arch/arm/boot/dts/integratorcp.dtb The scripts and files used are available from git@github.com:groeck/linux-build-test.git. qemu is version 2.12. Guenter > Thank you, > Pavel > >>> >>> Bisect log is attached. >>> >>> Guenter >>> >>> --- >>> # bad: [3946cd385042069ec57d3f04240def53b4eed7e5] Add linux-next specific files for 20180724 >>> # good: [d72e90f33aa4709ebecc5005562f52335e106a60] Linux 4.18-rc6 >>> git bisect start 'HEAD' 'v4.18-rc6' >>> # good: [f5fa891e325acf096c0f79e1d1b922002e251e5a] Merge remote-tracking branch 'crypto/master' >>> git bisect good f5fa891e325acf096c0f79e1d1b922002e251e5a >>> # good: [cb6471f6bcfdacbeef9c23ba9dac00e67bd3c3a4] Merge remote-tracking branch 'spi/for-next' >>> git bisect good cb6471f6bcfdacbeef9c23ba9dac00e67bd3c3a4 >>> # bad: [6b5bfa57bf4553d051be65d85d021465041406d8] Merge remote-tracking branch 'char-misc/char-misc-next' >>> git bisect bad 6b5bfa57bf4553d051be65d85d021465041406d8 >>> # bad: [675a67e9ef3c041999f412cb75418d2b0def3854] Merge remote-tracking branch 'rcu/rcu/next' >>> git bisect bad 675a67e9ef3c041999f412cb75418d2b0def3854 >>> # good: [e78b01a51131f25fc2d881bc43001575c129069c] Merge branch 'perf/core' >>> git bisect good e78b01a51131f25fc2d881bc43001575c129069c >>> # good: [4e581bce514f4107ce84525f0f75f89c92b4140e] Merge branch 'x86/cpu' >>> git bisect good 4e581bce514f4107ce84525f0f75f89c92b4140e >>> # good: [20fa22e90e54e2d21cace7ba083598531670f7cf] Merge branch 'x86/pti' >>> git bisect good 20fa22e90e54e2d21cace7ba083598531670f7cf >>> # good: [4763f03d3d186ce8a1125844790152d76804ad60] x86/tsc: Use TSC as sched clock early >>> git bisect good 4763f03d3d186ce8a1125844790152d76804ad60 >>> # good: [5f9ef44c7d1c59d0eda1d86e31d981bdffe2a725] tools/memory-model: Rename litmus tests to comply to norm7 >>> git bisect good 5f9ef44c7d1c59d0eda1d86e31d981bdffe2a725 >>> # bad: [fc3d25e1c8f6a9232530db02a1072033e22e0fe3] Merge branch 'x86/timers' >>> git bisect bad fc3d25e1c8f6a9232530db02a1072033e22e0fe3 >>> # bad: [46457ea464f5341d1f9dad8dd213805d45f7f117] sched/clock: Use static key for sched_clock_running >>> git bisect bad 46457ea464f5341d1f9dad8dd213805d45f7f117 >>> # bad: [857baa87b6422bcfb84ed3631d6839920cb5b09d] sched/clock: Enable sched clock early >>> git bisect bad 857baa87b6422bcfb84ed3631d6839920cb5b09d >>> # good: [5d2a4e91a541cb04d20d11602f0f9340291322ac] sched/clock: Move sched clock initialization and merge with generic clock >>> git bisect good 5d2a4e91a541cb04d20d11602f0f9340291322ac >>> # first bad commit: [857baa87b6422bcfb84ed3631d6839920cb5b09d] sched/clock: Enable sched clock early >