Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8363189ybl; Thu, 16 Jan 2020 15:23:13 -0800 (PST) X-Google-Smtp-Source: APXvYqyj62a4WdOlV1N1b8+RgsjdS2PdpCb8fSbwviEUfFnNbZDMsLVVrTPs9UzDnSLLWFTVSwhy X-Received: by 2002:aca:af8b:: with SMTP id y133mr1316111oie.73.1579216993370; Thu, 16 Jan 2020 15:23:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579216993; cv=none; d=google.com; s=arc-20160816; b=W6Thg6BtSE0D8SNodzMI6/sP1KAjltnz8K0eR8lzCzrn05+MjDTSOb55esBFUuNaA6 XZHn4AUvrVUMPcM8XrBnLDESmsjlsgyE8HcqCn2ORXAbvq4NeNfOHF6NDErkXj8ikZEo 4nQwJWMBocdg/CgHcU6q7YKBf9dqBlUsRPx/0c2dpHlCxX4hBAkwqqQWWcmACp7wiTUf 4CaPJP3ZZl/v4D16WvRuZy5DgprHcH9LA3B7eFpceaUVrR2SAA4UVT4OyCBgIYda2HKz gPCGUtSPfI8kHzD3b1QB1Ho+P2hqWkWmnZajpC24PD5qmGsU/XFrFm780lvsQ75a+A3+ zMjA== 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:organization:from:references:cc:to:subject :dkim-signature; bh=dfJAU7RaHy4HkG5bX3qzQ3Wzr16UrjmMEFK9k1V7IkQ=; b=hzZCe1LW64J6d/NjfTy90zHxUtjafOjS3ykrl8cQrN265GrrScCd2mgrOd0LO05UAl VIGWJUcupXauXQu0aKJbG2ZmdbaefmSSte5xSDjeLrwQ+3Y/MC8tPRp9gEie+QIWwmDa mWJRk9b/0TrDz67RMztRnbsYoBeDVzT+3ehwUBRW3tENL92rX9CcAXKYtX00yyu+6Hev PNzbj9aQYfsZkYOm/B+PEE5/hVROii5PbuYOLiUU864o7vI5oyJWU0V8MixJ1Gmyw7mF yA3mprHlLA/MVp2eLmWe6rjN21VILeq+U8HcUyChF4QawKSQ5ffnpU5WCTaN0boNn37x pafg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YjWDNDUN; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i8si12216825oih.206.2020.01.16.15.23.00; Thu, 16 Jan 2020 15:23:13 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YjWDNDUN; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437501AbgAPTOB (ORCPT + 99 others); Thu, 16 Jan 2020 14:14:01 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:47507 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2437490AbgAPTN5 (ORCPT ); Thu, 16 Jan 2020 14:13:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579202036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dfJAU7RaHy4HkG5bX3qzQ3Wzr16UrjmMEFK9k1V7IkQ=; b=YjWDNDUNaEK3ir3JdxHeu1DbYBW0GcyEZ4EtpIAngmxICCqN4agf+V4c/l/9lizUqMusYy 76aE9S5GY/SjKDdUvf5pV6LqmHuvCvXtFdsPUvbok5OvFatwfW+j7P6EZRr0U8ocJf6N7o lYhTcfwkJ7rCPnprRj/uCkEOEAqiJQo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-412-_pqLLkqMPlaIidvTIzRJPg-1; Thu, 16 Jan 2020 14:13:52 -0500 X-MC-Unique: _pqLLkqMPlaIidvTIzRJPg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C7299107ACC7; Thu, 16 Jan 2020 19:13:50 +0000 (UTC) Received: from llong.remote.csb (dhcp-17-59.bos.redhat.com [10.18.17.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 923CC60C63; Thu, 16 Jan 2020 19:13:49 +0000 (UTC) Subject: Re: [PATCH v2] watchdog: Fix possible soft lockup warning at bootup To: Thomas Gleixner , Robert Richter Cc: Andrew Morton , Ingo Molnar , "linux-kernel@vger.kernel.org" , Mike Rapoport , Kees Cook , Catalin Marinas , Will Deacon , Peter Zijlstra References: <87ftgffc9z.fsf@nanos.tec.linutronix.de> From: Waiman Long Organization: Red Hat Message-ID: <7168b0aa-4904-4246-0de5-3906df13b5c8@redhat.com> Date: Thu, 16 Jan 2020 14:13:49 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <87ftgffc9z.fsf@nanos.tec.linutronix.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/16/20 2:10 PM, Thomas Gleixner wrote: > Waiman Long writes: > >> On 1/16/20 11:57 AM, Thomas Gleixner wrote: >>>> So your theory the MONOTONIC clock runs differently/wrongly could >>>> explain that (assuming this drives the sched clock). Though, I am >>> No. sched_clock() is separate. It uses a raw timestamp (in your case >>> from the ARM arch timer) and converts it to something which is close = to >>> proper time. So my assumption was based on the printout Waiman had: >>> >>> [ 1... ] CPU.... watchdog_fn now 170000000 >>> [ 25.. ] CPU.... watchdog_fn now 4170000000 >>> >>> I assumed that now comes from ktime_get() or something like >>> that. Waiman? >> I printed out the now parameter of the=C2=A0 __hrtimer_run_queues() ca= ll. > Yes. That's clock MONOTONIC. > >> So from the timer perspective, it is losing time. For watchdog, the so= ft >> expiry time is 4s. The watchdog function won't be called until the >> timer's time advances 4s or more. That corresponds to about 24s in >> timestamp time for that particular class of systems. > Right. And assumed that the firmware call is the culprit this has an > explanation. > > Could you please take sched_clock() timestamps before and after the > firmware call which kicks the secondary CPUs into life to verify that? > > They should sum up to the amount of time which gets lost accross > smp_init(). Sure, I will do that after I get hold of the arm64 system that can reproduce the issue. That system is currently used by another engineer. Cheers, Longman