From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752130AbdHPQ7j (ORCPT ); Wed, 16 Aug 2017 12:59:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:60872 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751638AbdHPQ7i (ORCPT ); Wed, 16 Aug 2017 12:59:38 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 175CD22B4F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Wed, 16 Aug 2017 12:59:35 -0400 From: Steven Rostedt To: Linus Torvalds Cc: LKML , Ingo Molnar , Peter Zijlstra , "Paul E. McKenney" , Andrew Morton Subject: Re: [PATCH] completion: Document that reinit_completion() must be called after complete_all() Message-ID: <20170816125935.6fde64ca@gandalf.local.home> In-Reply-To: References: <20170816112735.0c7d9e1a@gandalf.local.home> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 16 Aug 2017 09:47:38 -0700 Linus Torvalds wrote: > On Wed, Aug 16, 2017 at 8:27 AM, Steven Rostedt 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