From: Matthew Wilcox <willy@infradead.org>
To: David Howells <dhowells@redhat.com>,
Jeff Layton <jlayton@kernel.org>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] mm/readahead: Handle ractl nr_pages being modified
Date: Tue, 20 Apr 2021 21:06:54 +0100 [thread overview]
Message-ID: <20210420200654.GC3596236@casper.infradead.org> (raw)
In-Reply-To: <20210420200116.3715790-1-willy@infradead.org>
On Tue, Apr 20, 2021 at 09:01:15PM +0100, Matthew Wilcox (Oracle) wrote:
> The BUG_ON that checks whether the ractl is still in sync with the
> local variables can trigger under some fairly unusual circumstances.
> Remove the BUG_ON and resync the loop counter after every call to
> read_pages().
>
> One way I've seen to trigger it is:
>
> - Start out with a partially populated range in the page cache
> - Allocate some pages and run into an existing page
> - Send the read request off to the filesystem
> - The page we ran into is removed from the page cache
> - readahead_expand() succeeds in expanding upwards
> - Return to page_cache_ra_unbounded() and we hit the BUG_ON, as nr_pages
> has been adjusted upwards.
(nb: this has only been reported for a kernel which has readahead_expand().
there is no indication this BUG_ON can be hit by a released kernel)
next prev parent reply other threads:[~2021-04-20 20:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-20 20:01 [PATCH] mm/readahead: Handle ractl nr_pages being modified Matthew Wilcox (Oracle)
2021-04-20 20:06 ` Matthew Wilcox [this message]
2021-04-20 20:12 ` Jeff Layton
2021-04-20 21:03 ` Matthew Wilcox
2021-04-21 16:49 ` Jeff Layton
2021-04-21 10:34 ` David Howells
2021-04-21 12:27 ` Matthew Wilcox
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=20210420200654.GC3596236@casper.infradead.org \
--to=willy@infradead.org \
--cc=dhowells@redhat.com \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).