mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Hillf Danton <dhillf@gmail.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] stop_machine: check work->done while handling enqueued works
Date: Wed, 6 Feb 2013 10:46:38 -0800	[thread overview]
Message-ID: <20130206184638.GA2875@htj.dyndns.org> (raw)
In-Reply-To: <CAJd=RBD=yMa1-iAm_i71U+KKRNYmXDTb6yZzW5aVAGHQ+zD8Sw@mail.gmail.com>

On Wed, Feb 06, 2013 at 08:36:01PM +0800, Hillf Danton wrote:
> To advoid invalid reference, updating work result is moved to
> cpu_stop_signal_done().

Can you please elaborate "why" in addition to "what"?  Do we actually
have a bug here, is it meant to be an independent cleanup, or is it
something which is necessary for later patches in the series?  What
are we achieving here?

>  /* signal completion unless @done is NULL */
> -static void cpu_stop_signal_done(struct cpu_stop_done *done, bool executed)
> +static void cpu_stop_signal_done(struct cpu_stop_done *done, bool
> executed, int ret)

Patch is corrupt.

> @@ -279,8 +281,6 @@ repeat:
>  		preempt_disable();
> 
>  		ret = fn(arg);
> -		if (ret)
> -			done->ret = ret;

If this is meant as a pure cleanup, I'm not sure it's an improvement.
You own your cpu_stop_done until you call cpu_stop_signal_done() on
it, so I don't think there's anything wrong with the current code.
The new code is different, not necessarily better.

Thanks.

-- 
tejun

  reply	other threads:[~2013-02-06 18:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-06 12:36 Hillf Danton
2013-02-06 18:46 ` Tejun Heo [this message]
2013-02-07 12:13   ` Hillf Danton
2013-02-07 16:37     ` Tejun Heo

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=20130206184638.GA2875@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=dhillf@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rusty@rustcorp.com.au \
    /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

all inboxes | Powered by JetHome®