Linux filesystem development
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Mani Tofigh via B4 Relay <devnull+mt4022.columbia.edu@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Christian Brauner <brauner@kernel.org>,
	Michal Nazarewicz <mina86@mina86.com>,
	Wen Yang <wen.yang@linux.dev>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	tz2294@columbia.edu, Mani Tofigh <mt4022@columbia.edu>
Subject: Re: [PATCH v2 2/2] sched/wait: Pass wq_flags to __wait_event_interruptible_locked()
Date: Mon, 23 Nov 2026 15:35:13 +0100	[thread overview]
Message-ID: <awRPIenAyY1fCRIg@redhat.com> (raw)
In-Reply-To: <20261122-b4-sched-wait-intr-head-v2-2-4a764b64e8ce@columbia.edu>

On 11/22, Mani Tofigh via B4 Relay wrote:
>
> --- a/include/linux/wait.h
> +++ b/include/linux/wait.h
> @@ -770,12 +770,11 @@ do {										\
>  extern int do_wait_intr(wait_queue_head_t *, wait_queue_entry_t *);
>  extern int do_wait_intr_irq(wait_queue_head_t *, wait_queue_entry_t *);
>  
> -#define __wait_event_interruptible_locked(wq, condition, exclusive, fn)		\
> +#define __wait_event_interruptible_locked(wq, condition, wq_flags, fn)		\
>  ({										\
>  	int __ret;								\
>  	DEFINE_WAIT(__wait);							\
> -	if (exclusive)								\
> -		__wait.flags |= WQ_FLAG_EXCLUSIVE;				\
> +	__wait.flags = (wq_flags);						\
>  	do {									\
>  		__ret = fn(&(wq), &__wait);					\
>  		if (__ret)							\
> @@ -870,7 +869,8 @@ extern int do_wait_intr_irq(wait_queue_head_t *, wait_queue_entry_t *);
>   */
>  #define wait_event_interruptible_exclusive_locked(wq, condition)		\
>  	((condition)								\
> -	 ? 0 : __wait_event_interruptible_locked(wq, condition, 1, do_wait_intr))
> +	 ? 0 : __wait_event_interruptible_locked(wq, condition,			\
> +						 WQ_FLAG_EXCLUSIVE, do_wait_intr))
>  
>  /**
>   * wait_event_interruptible_exclusive_locked_irq - sleep until a condition gets true
> @@ -901,7 +901,8 @@ extern int do_wait_intr_irq(wait_queue_head_t *, wait_queue_entry_t *);
>   */
>  #define wait_event_interruptible_exclusive_locked_irq(wq, condition)		\
>  	((condition)								\
> -	 ? 0 : __wait_event_interruptible_locked(wq, condition, 1, do_wait_intr_irq))
> +	 ? 0 : __wait_event_interruptible_locked(wq, condition,			\
> +						 WQ_FLAG_EXCLUSIVE, do_wait_intr_irq))

Reviewed-by: Oleg Nesterov <oleg@redhat.com>


      reply	other threads:[~2026-11-23 14:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23  0:35 [PATCH v2 0/2] sched/wait: Queue non-exclusive waiters at the head in do_wait_intr*() Mani Tofigh via B4 Relay
2026-11-23  0:35 ` [PATCH v2 1/2] " Mani Tofigh via B4 Relay
2026-11-23 14:28   ` Oleg Nesterov
2026-11-23  0:35 ` [PATCH v2 2/2] sched/wait: Pass wq_flags to __wait_event_interruptible_locked() Mani Tofigh via B4 Relay
2026-11-23 14:35   ` Oleg Nesterov [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=awRPIenAyY1fCRIg@redhat.com \
    --to=oleg@redhat.com \
    --cc=brauner@kernel.org \
    --cc=devnull+mt4022.columbia.edu@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mina86@mina86.com \
    --cc=mingo@redhat.com \
    --cc=mt4022@columbia.edu \
    --cc=peterz@infradead.org \
    --cc=torvalds@linux-foundation.org \
    --cc=tz2294@columbia.edu \
    --cc=wen.yang@linux.dev \
    /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