Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp334574pxf; Wed, 7 Apr 2021 00:11:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjf1A7bqq6EHluQX6Lqqm6IP0ckaro5v6udso4LMl2RzAlXrMNi2eVfwwlr4BgGvJIMVlH X-Received: by 2002:a05:6638:140e:: with SMTP id k14mr2013227jad.31.1617779471522; Wed, 07 Apr 2021 00:11:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617779471; cv=none; d=google.com; s=arc-20160816; b=06GaTXed4vziP6WZ+OKuM0/ni53gzOzu5dfkTDBr9QG2IN2fGFFXPSsvJS9SzAgwAA VcHv30rPiSJkGUdToac1dcEF3sD0gXn4YTc8C+Xl83yW46Eoqkm8mcYpOvlDCsyKvrEE J6B3+x/y+rQTtBrpUX7YmCMV/aJlzZUAylCg6ySZdAbU7bQueGMFBxKgV1gNfVslukL/ 0t4e+/9Uuwe7lLD4f1xQ7NsHipP/DDOjib9hp/6teOku2Bdsr4HmgKTYSGnrO5rbH1Rd okUuj1yVPywNpXWiX59mpsuFsRI5q42AZBkAoPl+yCtehkVyNh3hcNPQqi7TG4nFaLyC WA7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=ZUiVgyarw8PGVXfyY9PRSs3//RRLdceY8XHqX1zAz/U=; b=BNeFJQYd2q146RUCeXolwltB2grd23tW/3TIyT5pxx/sAj8uVGkjYgKK+grqNjWbhR TAsNXPgzP1qYc2Zm8/Usv2ONpg4wEhCezZneE3qtyWhOD7WK9vZXV89TXgVeBucd8hTF Nj3D3TckQtNXbDzThB/gHdQZZP0cJQbhok5w9WjiFRhB7LiLDUHfr0nLSpX7JX6kWElO w51msbWj+9z1EiI8diKNLqq+2vWH3VLw7zPYktk0yLGXUhNk4x+6T2SsxJc5qe0YAeil Jj1W6Sb/i2GpH3WTZlupf9XnGKRdHjV43KChSBZMZX9/3QyW1CeiqWz0iBx0srczCVAV Sa8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l6si14200741iow.44.2021.04.07.00.10.58; Wed, 07 Apr 2021 00:11:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238269AbhDFQKq (ORCPT + 99 others); Tue, 6 Apr 2021 12:10:46 -0400 Received: from foss.arm.com ([217.140.110.172]:45364 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233506AbhDFQKo (ORCPT ); Tue, 6 Apr 2021 12:10:44 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D2FCA1063; Tue, 6 Apr 2021 09:10:35 -0700 (PDT) Received: from e107158-lin (unknown [10.1.195.57]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9BCC33F792; Tue, 6 Apr 2021 09:10:34 -0700 (PDT) Date: Tue, 6 Apr 2021 17:10:32 +0100 From: Qais Yousef To: Dongli Zhang Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, peterz@infradead.org, mpe@ellerman.id.au, aneesh.kumar@linux.ibm.com, ethp@qq.com, npiggin@gmail.com, joe.jin@oracle.com Subject: Re: [PATCH RFC 1/1] kernel/cpu: to track which CPUHP callback is failed Message-ID: <20210406161032.iwmlfszrfcpjss5e@e107158-lin> References: <20210310070837.17674-1-dongli.zhang@oracle.com> <40a7be6b-0603-a2ab-afaa-339e88a03210@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <40a7be6b-0603-a2ab-afaa-339e88a03210@oracle.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/05/21 14:22, Dongli Zhang wrote: > May I have if there is any feedback on this? To pr_err_once() here helps narrow > down what is the root cause of cpu online failure. > > > The issue fixed by d7eb79c6290c ("KVM: kvmclock: Fix vCPUs > 64 can't be > online/hotpluged") is able to demonstrate how this pr_err_once() helps. > > Due to VM kernel issue, at most 64 VCPUs can online if host clocksource is > switched to hpet. > > # echo hpet > /sys/devices/system/clocksource/clocksource0/current_clocksource > > > By default, we have no idea why only 64 out of 100 VCPUs are online in VM. We > need to customize kernel to debug why some CPUs are not able to online. > > > We will have below and know the root cause is with kvmclock, if we add the > pr_err_once(). Isn't pr_debug() more appropriate here? Don't you want one on the cpuhp_down_callbacks() too? I *think* it's common now to have CONFIG_DYNAMIC_DEBUG enabled so one can enable that line when they need to https://www.kernel.org/doc/html/latest/admin-guide/dynamic-debug-howto.html I can see the appeal of pr_err_once() but I think this can fail for legitimate reasons and is not necessarily strictly always an error? Thanks -- Qais Yousef