From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751590AbdA2QXk (ORCPT ); Sun, 29 Jan 2017 11:23:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49132 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751258AbdA2QWI (ORCPT ); Sun, 29 Jan 2017 11:22:08 -0500 Subject: Re: [PATCH -tip] sched/wake_q: Clarify queue reinit To: Davidlohr Bueso , hpa@zytor.com, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, paulmck@linux.vnet.ibm.com, mingo@kernel.org, peterz@infradead.org, torvalds@linux-foundation.org References: <1485052415-9611-1-git-send-email-longman@redhat.com> <20170129151531.GA2444@linux-80c1.suse> Cc: linux-tip-commits@vger.kernel.org From: Waiman Long Organization: Red Hat Message-ID: <615d52a4-7362-339f-e14d-28a5176b0306@redhat.com> Date: Sun, 29 Jan 2017 11:22:06 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20170129151531.GA2444@linux-80c1.suse> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Sun, 29 Jan 2017 16:22:08 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/29/2017 10:15 AM, Davidlohr Bueso wrote: > As of bcc9a76d5ac (locking/rwsem: Reinit wake_q after use), the > comment regarding the list reinitialization no longer applies, > update it with the new wake_q_init() helper. > > Signed-off-by: Davidlohr Bueso > --- > include/linux/sched.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/linux/sched.h b/include/linux/sched.h > index 3640bde9f982..c0bc626c531f 100644 > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@ -998,8 +998,8 @@ enum cpu_idle_type { > * > * The DEFINE_WAKE_Q macro declares and initializes the list head. > * wake_up_q() does NOT reinitialize the list; it's expected to be > - * called near the end of a function, where the fact that the queue is > - * not used again will be easy to see by inspection. > + * called near the end of a function. Otherwise, the list can be > + * re-initialized for later re-use by wake_q_init(). > * > * Note that this can cause spurious wakeups. schedule() callers > * must ensure the call is done inside a loop, confirming that the Acked-by: Waiman Long