mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] completion: Document that reinit_completion() must be called after complete_all()
Date: Wed, 16 Aug 2017 12:59:35 -0400	[thread overview]
Message-ID: <20170816125935.6fde64ca@gandalf.local.home> (raw)
In-Reply-To: <CA+55aFz=Yg=eOgJ9cP3GzF9eJsAyZF+XkBBe2EBZYrpvT5oJ5Q@mail.gmail.com>

On Wed, 16 Aug 2017 09:47:38 -0700
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Wed, Aug 16, 2017 at 8:27 AM, Steven Rostedt <rostedt@goodmis.org> wrote:
> > The function complete_all() modifies the completion "done" variable to
> > UINT_MAX, and no other caller (wait_for_completion(), etc) will modify
> > it back to zero. That means that any call to complete_all() must have a
> > reinit_completion() before that completion can be used again.
> >
> > Document this fact by the complete_all() function.  
> 
> I think this is misleading.
> 
> People reading that comment will just say "why doesn't complete_all()
> just reinit the thing then?"
> 
> So the comment should probably say that it needs to be reinited after
> all the existing completion users have actually woken up, so that it
> explains why the reinit isn't just done by complete_all().
> 

Agreed. I'll send a v2.

Thanks,

-- Steve

      reply	other threads:[~2017-08-16 16:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-16 15:27 Steven Rostedt
2017-08-16 16:47 ` Linus Torvalds
2017-08-16 16:59   ` Steven Rostedt [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=20170816125935.6fde64ca@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=torvalds@linux-foundation.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

all inboxes | Powered by JetHome®