Re: [LTP] Question on hugemmap34

Jan Stancek
2024-12-11T10:50:19Z

On Wed, Dec 11, 2024 at 7:46 AM Jan Stancek <jstancek@redhat.com> wrote:
>
> On Wed, Dec 11, 2024 at 4:21 AM Wei Gao <wegao@suse.com> wrote:
> >
> > Hi Jan
> >
> > Thanks for your quick support.
> > Since i use a kernel with my debug enabled so the test case timeout first time, when i use normal kernel run the test case with your patch, the test result show pass.
> > Then i guess you will send new separate patch for fix this later?
>
> I'm thinking if we can rewrite it with clone(), so that we can set up
> stack and hugepage for the child reliably.
>
> Right now, "the mmap search" is slow, and we end up with address
> that's "too far". In your example
> the child crashes long before it comes near the area test mapped.
>
> Also the original test is mapping from libhugetlfs and LTP port just
> maps a temp file.

My bad about this last part - there's actually needs_hugetlbfs = 1 in the test
that I missed. Anyway, I'll give the clone() approach a try.