[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200629151340.GC20323@redhat.com>
Date: Mon, 29 Jun 2020 17:13:41 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
Nick Piggin <npiggin@...il.com>,
Mel Gorman <mgorman@...hsingularity.net>,
Jan Kara <jack@...e.cz>, Davidlohr Bueso <dave@...olabs.net>,
Andi Kleen <ak@...ux.intel.com>,
Lukas Czerner <lczerner@...hat.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: wait_on_page_bit_common(TASK_KILLABLE, EXCLUSIVE) can miss
wakeup?
On 06/27, Linus Torvalds wrote:
>
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -1150,6 +1150,12 @@ static inline int wait_on_page_bit_common(wait_queue_head_t *q,
> io_schedule();
>
> if (behavior == EXCLUSIVE) {
> + /*
> + * Make sure we don't get any exclusive wakeups
> + * after this point!
> + */
> + __set_current_state(TASK_RUNNING);
> + smp_mb__before_atomic();
> if (!test_and_set_bit_lock(bit_nr, &page->flags))
> break;
> } else if (behavior == SHARED) {
FWIW,
Reviewed-by: Oleg Nesterov <oleg@...hat.com>
Powered by blists - more mailing lists