Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1569225

Re: [PATCH -tip] sched/wake_q: Clarify queue reinit

From Waiman Long <longman@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH -tip] sched/wake_q: Clarify queue reinit
Date 2017-01-29 17:30 +0100
Message-ID <t50wx-QR-1@gated-at.bofh.it> (permalink)
References <t2get-3es-5@gated-at.bofh.it> <t2npD-7Yy-1@gated-at.bofh.it> <t4ZK9-jw-5@gated-at.bofh.it>
Organization Red Hat

Show all headers | View raw


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 <dbueso@suse.de>
> ---
> 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 <longman@redhat.com>

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] locking/rwsem: Reinit wake_q after use Waiman Long <longman@redhat.com> - 2017-01-22 03:40 +0100
  [tip:locking/core] locking/rwsem: Reinit wake_q after use tip-bot for Waiman Long <tipbot@zytor.com> - 2017-01-22 11:20 +0100
    [PATCH -tip] sched/wake_q: Clarify queue reinit Davidlohr Bueso <dave@stgolabs.net> - 2017-01-29 16:40 +0100
      Re: [PATCH -tip] sched/wake_q: Clarify queue reinit Waiman Long <longman@redhat.com> - 2017-01-29 17:30 +0100

csiph-web