public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Yuan ZhaoXiong <yuanzhx326@gmail.com>,
	steven.price@arm.com, Jason@zx2c4.com, juri.lelli@redhat.com,
	tony.luck@intel.com, frederic@kernel.org, yuanzhx326@gmail.com,
	sathyanarayanan.kuppuswamy@linux.intel.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpu: printk error information when call cpu_up() failed.
Date: Thu, 01 Dec 2022 12:40:13 +0100	[thread overview]
Message-ID: <87h6yfs676.ffs@tglx> (raw)
In-Reply-To: <20221128132803.17599-1-yuanzhx326@gmail.com>

On Mon, Nov 28 2022 at 21:28, Yuan ZhaoXiong wrote:
> It is better to printk error information out when calling cpu_up() failed.
> Users will observe cpu up error conveniently via the kernel log.
...
> +		if (!cpu_online(cpu)) {
> +			error = cpu_up(cpu, CPUHP_ONLINE);
> +			if (error)
> +				pr_err("Error taking CPU%d up: %d\n", cpu, error);

What's useful about it? If the CPU does not come up then it won't be
online.

The error code is pretty useless too because it does not tell you which
part of the online procedure caused it to fail. Just assume it fails
with -ENOMEM, then good luck to find the callback which observed the
memory allocation fail.

Thanks,

        tglx

      reply	other threads:[~2022-12-01 11:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28 13:28 [PATCH] cpu: printk error information when call cpu_up() failed Yuan ZhaoXiong
2022-12-01 11:40 ` Thomas Gleixner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h6yfs676.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=Jason@zx2c4.com \
    --cc=frederic@kernel.org \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=steven.price@arm.com \
    --cc=tony.luck@intel.com \
    --cc=yuanzhx326@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox