[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZCr7wRBuhzupX06j@x1n>
Date: Mon, 3 Apr 2023 12:16:01 -0400
From: Peter Xu <peterx@...hat.com>
To: Mike Kravetz <mike.kravetz@...cle.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
David Hildenbrand <david@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Andrea Arcangeli <aarcange@...hat.com>,
Axel Rasmussen <axelrasmussen@...gle.com>,
Leonardo Bras Soares Passos <lsoaresp@...hat.com>,
Mike Rapoport <rppt@...ux.vnet.ibm.com>,
Nadav Amit <nadav.amit@...il.com>
Subject: Re: [PATCH 11/29] selftests/mm: Drop test_uffdio_zeropage_eexist
On Fri, Mar 31, 2023 at 05:03:17PM -0700, Mike Kravetz wrote:
> On 03/30/23 12:07, Peter Xu wrote:
> > The idea was trying to flip this var in the alarm handler from time to time
> > to test -EEXIST of UFFDIO_ZEROPAGE, but firstly it's only used in the
> > zeropage test so probably only used once, meanwhile we passed
> > "retry==false" so it'll never got tested anyway.
> >
> > Drop both sides so we always test UFFDIO_ZEROPAGE retries if has_zeropage
> > is set (!hugetlb).
> >
> > One more thing to do is doing UFFDIO_REGISTER for the alias buffer too,
> > because otherwise the test won't even pass! We were just lucky that this
> > test never really got ran at all.
> >
> > Signed-off-by: Peter Xu <peterx@...hat.com>
> > ---
> > tools/testing/selftests/mm/userfaultfd.c | 20 +++++++++++---------
> > 1 file changed, 11 insertions(+), 9 deletions(-)
>
> Thanks! With only passing "retry==false", that code is indeed dead. I had
> to read the code again to understand area_dst_alias. Thanks for taking this
> on as the code is difficult to understand.
Yes it's very confusing. I plan to move on the cleanup to remove all these
global variables at least in the unit tests, but I'll first see how this
one goes.
>
> Reviewed-by: Mike Kravetz <mike.kravetz@...cle.com>
Thanks,
--
Peter Xu
Powered by blists - more mailing lists