Re: [PATCH v2 2/7] mm/selftests: add max_vma_count tests
From: Kalesh Singh
Date: Wed Sep 17 2025 - 12:50:31 EST
On Wed, Sep 17, 2025 at 3:58 AM 'David Hildenbrand' via kernel-team
<kernel-team@xxxxxxxxxxx> wrote:
>
> > + * test_suite_setup - Set up the VMA layout for VMA count testing.
> > + *
> > + * Sets up the following VMA layout:
> > + *
> > + * +----- base_addr
> > + * |
> > + * V
> > + * +--------------+----------------------+--------------+----------------+--------------+----------------+--------------+-----+----------------+--------------+
> > + * | Guard Page | | Guard Page | Extra Map 1 | Unmapped Gap | Extra Map 2 | Unmapped Gap | ... | Extra Map N | Unmapped Gap |
> > + * | (unmapped) | TEST_AREA | (unmapped) | (mapped page) | (1 page) | (mapped page) | (1 page) | ... | (mapped page) | (1 page) |
> > + * | (1 page) | (unmapped, 3 pages) | (1 page) | (1 page) | | (1 page) | | | (1 page) | |
> > + * +--------------+----------------------+--------------+----------------+--------------+----------------+--------------+-----+----------------+--------------+
> > + * ^ ^ ^ ^ ^
> > + * | | | | |
> > + * +--GUARD_SIZE--+ | +-- EXTRA_MAPS points here Sufficient EXTRA_MAPS to ---+
> > + * (PAGE_SIZE) | | reach MAX_VMA_COUNT
> > + * | |
> > + * +--- TEST_AREA_SIZE ---+
> > + * | (3 * PAGE_SIZE) |
> > + * ^
> > + * |
> > + * +-- TEST_AREA starts here
> > + *
> >
>
Hi David,
Thanks for the reviews.
> Just wondering if we could find a different name than "guard page" here,
> to not confuse stuff with guard ptes
>
> Will the current "guard page" we a valid vma or just a hole?
It's a hole to prevent coincidental merging of adjacent VMAs. I can
rename it to HOLE in the next revision.
Thanks,
Kalesh
>
> --
> Cheers
>
> David / dhildenb
>
> To unsubscribe from this group and stop receiving emails from it, send an email to kernel-team+unsubscribe@xxxxxxxxxxx.
>