From: Matthew Wilcox <willy@infradead.org>
To: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
William Kucharski <william.kucharski@oracle.com>,
Christoph Hellwig <hch@lst.de>, Jan Kara <jack@suse.cz>,
Dave Chinner <dchinner@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Yang Shi <yang.shi@linux.alibaba.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH 1/2] mm/filemap: fix find_lock_entries hang on 32-bit THP
Date: Thu, 22 Apr 2021 02:06:30 +0100 [thread overview]
Message-ID: <20210422010630.GK3596236@casper.infradead.org> (raw)
In-Reply-To: <alpine.LSU.2.11.2104211735430.3299@eggly.anvils>
On Wed, Apr 21, 2021 at 05:37:33PM -0700, Hugh Dickins wrote:
> - if (!xa_is_value(page) && PageTransHuge(page))
> - xas_set(&xas, page->index + thp_nr_pages(page));
> + if (!xa_is_value(page) && PageTransHuge(page)) {
> + unsigned int nr_pages = thp_nr_pages(page);
> +
> + /* Final THP may cross MAX_LFS_FILESIZE on 32-bit */
> + xas_set(&xas, page->index + nr_pages);
> + if (xas.xa_index < nr_pages)
> + break;
> + }
Aargh. We really need to get the multi-index support in; this works
perfectly when the xas_set() hack isn't needed any more.
next prev parent reply other threads:[~2021-04-22 1:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 0:35 [PATCH 0/2] mm/filemap: fix 5.12-rc regressions Hugh Dickins
2021-04-22 0:37 ` [PATCH 1/2] mm/filemap: fix find_lock_entries hang on 32-bit THP Hugh Dickins
2021-04-22 1:06 ` Matthew Wilcox [this message]
2021-04-22 0:39 ` [PATCH 2/2] mm/filemap: fix mapping_seek_hole_data on THP & 32-bit Hugh Dickins
2021-04-22 1:16 ` Matthew Wilcox
2021-04-22 5:55 ` Hugh Dickins
2021-04-22 20:46 ` Hugh Dickins
2021-04-22 20:48 ` [PATCH v2 " Hugh Dickins
2021-04-22 23:04 ` Andrew Morton
2021-04-23 17:22 ` Hugh Dickins
2021-04-23 19:29 ` Andrew Morton
2021-04-23 20:08 ` Hugh Dickins
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=20210422010630.GK3596236@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=dchinner@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=hch@lst.de \
--cc=hughd@google.com \
--cc=jack@suse.cz \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=william.kucharski@oracle.com \
--cc=yang.shi@linux.alibaba.com \
/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).