[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8e23c5d3-6ce3-4fe8-b6fe-69658d5d0727@lucifer.local>
Date: Wed, 18 Jun 2025 12:57:38 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: Dev Jain <dev.jain@....com>
Cc: Aboorva Devarajan <aboorvad@...ux.ibm.com>, akpm@...ux-foundation.org,
Liam.Howlett@...cle.com, shuah@...nel.org, pfalcato@...e.de,
david@...hat.com, ziy@...dia.com, baolin.wang@...ux.alibaba.com,
npache@...hat.com, ryan.roberts@....com, baohua@...nel.org,
linux-mm@...ck.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org, donettom@...ux.ibm.com,
ritesh.list@...il.com
Subject: Re: [PATCH 1/6] mm/selftests: Fix virtual_address_range test issues.
On Wed, Jun 18, 2025 at 05:15:50PM +0530, Dev Jain wrote:
>
> On 18/06/25 5:07 pm, Lorenzo Stoakes wrote:
> > On Wed, Jun 18, 2025 at 04:58:56PM +0530, Dev Jain wrote:
> > > MAP_CHUNK_SIZE was chosen randomly. Good to see it translates into something logical : )
> > >
> > > So I guess I am correct, if we can find two VMAs (except at the edge of the high addr boundary)
> > > with a gap of greater than MAP_CHUNK_SIZE then there is a bug in mmap().
> > No haha, not at all!! Firstly fixed addressed override a lot of this, secondly
> > the 256 page gap (which is configurable btw) is only applicable for mappings
> > below a stack (in stack grow down arch).
>
> Sorry, I was making that assertion w.r.t this specific selftest. What the test
> is doing is exhausting VA space without passing a hint or MAP_FIXED. With this
> context, where does this assertion fail? One of them will be if the stack guard
> gap is more than 256 pages.
Are you accounting for sys.max_map_count? If not, then you'll be hitting that
first.
>
> Also, note that the test hasn't reported frequent failures post my change, so
> in general settings, w.r.t this test, the assertion experimentally seems to
> be true : )
I don't really have time to dig into the test in detail sorry too much else on
at the moment.
But it isn't a big problem even if it happened to turn out that this test isn't
really testing quite what you expected :)
Powered by blists - more mailing lists