linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Nicolai Stange <nicstange@gmail.com>
Cc: Juergen Gross <jgross@suse.com>, Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Richard Weinberger <richard@nod.at>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] smp: smp_call_on_cpu(): use INIT_WORK_ONSTACK() for automatic work_struct
Date: Fri, 23 Sep 2016 09:21:17 +0200	[thread overview]
Message-ID: <20160923072117.GK2794@worktop> (raw)
In-Reply-To: <87mviz7nkn.fsf@gmail.com>

On Thu, Sep 22, 2016 at 09:15:52PM +0200, Nicolai Stange wrote:

> One minor question regarding your patch though: it hasn't got a
> destroy_work_on_stack(). Isn't one needed because of
>   INIT_WORK_ONSTACK() -> __INIT_WORK() -> __init_work() ->
>   debug_object_init_on_stack() ?
> At least work_on_cpu() destroys its local work_struct that way...

I wasn't aware of destroy_work_on_stack(), and I'm not familiar enough
with the debug objects stuff to see hwo important it is to call.

Also, there's more INIT_WORK_ONSTACK usage lacking
destroy_work_on_stack() calls.

Maybe it would be good to do a patch fixing them all up and adding a
comment with INIT_WORK_ONSTACK() that says it ought to be paired with
destroy_work_on_stack().

      reply	other threads:[~2016-09-23  7:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22 18:17 [PATCH] smp: smp_call_on_cpu(): use INIT_WORK_ONSTACK() for automatic work_struct Nicolai Stange
2016-09-22 18:44 ` Peter Zijlstra
2016-09-22 19:15   ` Nicolai Stange
2016-09-23  7:21     ` Peter Zijlstra [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=20160923072117.GK2794@worktop \
    --to=peterz@infradead.org \
    --cc=dave@stgolabs.net \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=nicstange@gmail.com \
    --cc=richard@nod.at \
    --cc=tglx@linutronix.de \
    /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).