linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Mukesh Ojha <mojha@codeaurora.org>
Cc: Neeraj Upadhyay <neeraju@codeaurora.org>,
	josh@joshtriplett.org, peterz@infradead.org, mingo@kernel.org,
	jiangshanlai@gmail.com, dzickus@redhat.com,
	brendan.jackman@arm.com, malat@debian.org,
	linux-kernel@vger.kernel.org, sramana@codeaurora.org,
	linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] cpu/hotplug: Fix rollback during error-out in takedown_cpu()
Date: Wed, 5 Sep 2018 15:14:01 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1809051512450.1416@nanos.tec.linutronix.de> (raw)
In-Reply-To: <cf91ee04-a4b6-6f2c-d194-71b7e92fbf45@codeaurora.org>

[-- Attachment #1: Type: text/plain, Size: 1003 bytes --]

On Wed, 5 Sep 2018, Mukesh Ojha wrote:
> On 9/5/2018 5:03 PM, Thomas Gleixner wrote:
> > > +		st->rollback = true;
> > > +		st->target = prev_state;
> > > +		st->bringup = !st->bringup;
> > No, this is just papering over the actual problem.
> > 
> > The state inconsistency happens in take_cpu_down() when it returns with a
> > failure from __cpu_disable() because that returns with state = TEARDOWN_CPU
> > and st->state is then incremented in undo_cpu_down().
> > 
> > That's the real issue and we need to analyze the whole cpu_down rollback
> > logic first.
> 
> Could this be done like below ?

IOW, more papering over the real root cause.

> diff --git a/kernel/cpu.c b/kernel/cpu.c
> index aa7fe85..47bce90 100644
> --- a/kernel/cpu.c
> +++ b/kernel/cpu.c
> @@ -802,17 +802,18 @@ static int take_cpu_down(void *_param)
>         int err, cpu = smp_processor_id();
>         int ret;

  ^^^^^^^

Please fix your mailer or your editor. That patch is whitespace damaged.

Thanks,

	tglx

  reply	other threads:[~2018-09-05 13:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-04  6:33 [PATCH] cpu/hotplug: Fix rollback during error-out in takedown_cpu() Neeraj Upadhyay
2018-09-04 12:12 ` Mukesh Ojha
2018-09-05 11:33 ` Thomas Gleixner
2018-09-05 12:09   ` Mukesh Ojha
2018-09-05 13:14     ` Thomas Gleixner [this message]
2018-09-05 12:23   ` Thomas Gleixner
2018-09-05 12:51     ` Neeraj Upadhyay
2018-09-05 13:17       ` Thomas Gleixner
2018-09-06  2:56         ` Neeraj Upadhyay
2018-09-06  8:18           ` Thomas Gleixner
2018-09-06  9:00             ` Neeraj Upadhyay
2018-09-05 14:53     ` Sudeep Holla
2018-09-05 15:19       ` Geert Uytterhoeven
2018-09-06 13:52     ` [tip:smp/urgent] cpu/hotplug: Prevent state corruption on error rollback tip-bot for Thomas Gleixner

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=alpine.DEB.2.21.1809051512450.1416@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=brendan.jackman@arm.com \
    --cc=dzickus@redhat.com \
    --cc=jiangshanlai@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=malat@debian.org \
    --cc=mingo@kernel.org \
    --cc=mojha@codeaurora.org \
    --cc=neeraju@codeaurora.org \
    --cc=peterz@infradead.org \
    --cc=sramana@codeaurora.org \
    /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;
as well as URLs for NNTP newsgroup(s).