lkml.org 
[lkml]   [2017]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] sched/wait: Break up long wake list walk
On Tue, Aug 22, 2017 at 11:19:12AM -0700, Linus Torvalds wrote:
> diff --git a/mm/filemap.c b/mm/filemap.c
> index a49702445ce0..75c29a1f90fb 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -991,13 +991,11 @@ static inline int wait_on_page_bit_common(wait_queue_head_t *q,
> }
> }
>
> - if (lock) {
> - if (!test_and_set_bit_lock(bit_nr, &page->flags))
> - break;
> - } else {
> - if (!test_bit(bit_nr, &page->flags))
> - break;
> - }
> + if (!lock)
> + break;
> +
> + if (!test_and_set_bit_lock(bit_nr, &page->flags))
> + break;
> }

Won't we now prematurely terminate the wait when we get a spurious
wakeup?

\
 
 \ /
  Last update: 2017-08-22 20:57    [W:0.134 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site