[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=who82OKiXyTiCG3rUaiicO_OB9prVvZQBzg6GDGhdp+Ew@mail.gmail.com>
Date: Wed, 19 Jun 2024 08:48:28 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Matthew Wilcox <willy@...radead.org>
Cc: David Hildenbrand <david@...hat.com>, Gavin Shan <gshan@...hat.com>,
Bagas Sanjaya <bagasdotme@...il.com>, Zhenyu Zhang <zhenyzha@...hat.com>,
Linux XFS <linux-xfs@...r.kernel.org>,
Linux Filesystems Development <linux-fsdevel@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Shaoqin Huang <shahuang@...hat.com>,
Chandan Babu R <chandan.babu@...cle.com>, "Darrick J. Wong" <djwong@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: Endless calls to xas_split_alloc() due to corrupted xarray entry
On Wed, 19 Jun 2024 at 07:31, Matthew Wilcox <willy@...radead.org> wrote:
>
> Actually, it's 11. We can't split an order-12 folio because we'd have
> to allocate two levels of radix tree, and I decided that was too much
> work. Also, I didn't know that ARM used order-13 PMD size at the time.
>
> I think this is the best fix (modulo s/12/11/).
Can we use some more descriptive thing than the magic constant 11 that
is clearly very subtle.
Is it "XA_CHUNK_SHIFT * 2 - 1"
IOW, something like
#define MAX_XAS_ORDER (XA_CHUNK_SHIFT * 2 - 1)
#define MAX_PAGECACHE_ORDER min(HPAGE_PMD_ORDER,12)
except for the non-TRANSPARENT_HUGEPAGE case where it currently does
#define MAX_PAGECACHE_ORDER 8
and I assume that "8" is just "random round value, smaller than 11"?
Linus
Powered by blists - more mailing lists