Skip to content

Commit 0fda28f

Browse files
committed
filemap: remove use of wait bookmarks
jira LE-4066 Rebuild_History Non-Buildable kernel-4.18.0-553.72.1.el8_10 commit-author Matthew Wilcox (Oracle) <willy@infradead.org> commit b0b598e The original problem of the overly long list of waiters on a locked page was solved properly by commit 9a1ea43 ("mm: put_and_wait_on_page_locked() while page is migrated"). In the meantime, using bookmarks for the writeback bit can cause livelocks, so we need to stop using them. Link: https://lkml.kernel.org/r/20231010035829.544242-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Bin Lai <sclaibin@gmail.com> Cc: Benjamin Segall <bsegall@google.com> Cc: Daniel Bristot de Oliveira <bristot@redhat.com> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Mel Gorman <mgorman@suse.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt (Google) <rostedt@goodmis.org> Cc: Valentin Schneider <vschneid@redhat.com> Cc: Vincent Guittot <vincent.guittot@linaro.org> Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> (cherry picked from commit b0b598e) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent aaf3e1d commit 0fda28f

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

mm/filemap.c

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,32 +1138,13 @@ static void wake_up_page_bit(struct page *page, int bit_nr)
11381138
wait_queue_head_t *q = page_waitqueue(page);
11391139
struct wait_page_key key;
11401140
unsigned long flags;
1141-
wait_queue_entry_t bookmark;
11421141

11431142
key.page = page;
11441143
key.bit_nr = bit_nr;
11451144
key.page_match = 0;
11461145

1147-
bookmark.flags = 0;
1148-
bookmark.private = NULL;
1149-
bookmark.func = NULL;
1150-
INIT_LIST_HEAD(&bookmark.entry);
1151-
11521146
spin_lock_irqsave(&q->lock, flags);
1153-
__wake_up_locked_key_bookmark(q, TASK_NORMAL, &key, &bookmark);
1154-
1155-
while (bookmark.flags & WQ_FLAG_BOOKMARK) {
1156-
/*
1157-
* Take a breather from holding the lock,
1158-
* allow pages that finish wake up asynchronously
1159-
* to acquire the lock and remove themselves
1160-
* from wait queue
1161-
*/
1162-
spin_unlock_irqrestore(&q->lock, flags);
1163-
cpu_relax();
1164-
spin_lock_irqsave(&q->lock, flags);
1165-
__wake_up_locked_key_bookmark(q, TASK_NORMAL, &key, &bookmark);
1166-
}
1147+
__wake_up_locked_key(q, TASK_NORMAL, &key);
11671148

11681149
/*
11691150
* It is possible for other pages to have collided on the waitqueue

0 commit comments

Comments
 (0)