From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752866AbcFTHJh (ORCPT ); Mon, 20 Jun 2016 03:09:37 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:3240 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751935AbcFTHJS (ORCPT ); Mon, 20 Jun 2016 03:09:18 -0400 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="7864925" From: "Wei, Jiangang" To: "tglx@linutronix.de" CC: "hpa@zytor.com" , "linux-kernel@vger.kernel.org" , "akataria@vmware.com" , "mingo@redhat.com" , "x86@kernel.org" Subject: Re: RFC: Fix kdump failed with 'notsc' Thread-Topic: RFC: Fix kdump failed with 'notsc' Thread-Index: AQHRxiL/Zc2MNGgK40Wm4wQSoMa3bp/xbqGA Date: Mon, 20 Jun 2016 06:55:33 +0000 Message-ID: <1466405633.2398.0.camel@localhost> References: <1465898098.16116.52.camel@localhost> In-Reply-To: <1465898098.16116.52.camel@localhost> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.167.226.50] Content-Type: text/plain; charset="utf-8" Content-ID: <822CE3362523B541A07C254F8FB93C1A@fujitsu.local> MIME-Version: 1.0 X-yoursite-MailScanner-ID: AF98E498F58D.ACD00 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: weijg.fnst@cn.fujitsu.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u5K79fEm021806 ping... On Tue, 2016-06-14 at 17:54 +0800, Wei Jiangang wrote: > Hi, > > When I trigger kernel crash and specify 'notsc' for capture-kernel, > The process of kdump will be blocked at calibrate_delay_converge(). > > /* wait for "start of" clock tick */ > ticks = jiffies; > while (ticks == jiffies) > ; /* nothing */ > > The reason is that the jiffies remains the same, no changed. > > serial console log as following, > ............ > [ 0.000000] Linux version 4.7.0-rc2+ (root@localhost.localdomain) > (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #2 SMP Wed Jun > 156 > [ 0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-4.7.0-rc2+ > root=/dev/mapper/centos-root ro rd.lvm.lv=centos/swap > vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos/root crashkernel=256M > vconsole.keymap=us console=tty0 console=ttyS0,115200n8 LANG=en_US.UTF-8 > irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off numa=off > panic=10 rootflags=nofail acpi_no_memhotplug notsc > ............ > [ 0.000000] tsc: Kernel compiled with CONFIG_X86_TSC, cannot disable > TSC completely > ............ > [ 0.000000] clocksource: hpet: mask: 0xffffffff max_cycles: > 0xffffffff, max_idle_ns: 133484882848 ns > [ 0.000000] tsc: Fast TSC calibration using PIT > [ 0.000000] tsc: Detected 3192.714 MHz processor > [ 0.000000] Calibrating delay loop... > > # The last log is raised by calibrate_delay(), which calls > calibrate_delay_converge() to compute the lpj value. > > # So far, I don't know why the jiffies stays the same. > # But I found two methods can avoid this problem。 > > 1)specify the 'lpj=' with 'notsc' together. > > 2) revert the 70de9a9. > > commit 70de9a97049e0ba79dc040868564408d5ce697f9 > Author: Alok Kataria > Date: Mon Nov 3 11:18:47 2008 -0800 > > x86: don't use tsc_khz to calculate lpj if notsc is passed > > Impact: fix udelay when "notsc" boot parameter is passed > > With notsc passed on commandline, tsc may not be used for > udelays, make sure that we do not use tsc_khz to calculate > the lpj value in such cases. > > IMO, > The flow of getting tsc_khz as following, > tsc_init()->x86_platform.calibrate_tsc()->native_calibrate_tsc()->quick_pit_calibrate(). > No codes use or call 'rdtsc'. > > Even if ‘notsc’ is passed, the tsc_khz is credible. > and we can get lpj by it. > > So I want to push a patch to revert the 70de9a9. > Any comments or suggestions is appreciated. > > Thanks, > wei > > >