[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <64e21a2c-1bbe-4ab6-e67a-29b2d1d1978e@nvidia.com>
Date: Mon, 5 Jun 2023 12:09:56 -0700
From: John Hubbard <jhubbard@...dia.com>
To: Peter Xu <peterx@...hat.com>
CC: Andrew Morton <akpm@...ux-foundation.org>,
David Hildenbrand <david@...hat.com>,
Shuah Khan <shuah@...nel.org>,
Nathan Chancellor <nathan@...nel.org>, <linux-mm@...ck.org>,
<linux-kselftest@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 10/11] selftests/mm: move uffd* routines from vm_util.c
to uffd-common.c
On 6/5/23 08:59, Peter Xu wrote:
...
>> -$(OUTPUT)/uffd-stress: uffd-common.c
>> -$(OUTPUT)/uffd-unit-tests: uffd-common.c
>> +$(OUTPUT)/uffd-stress: uffd-common.c
>> +$(OUTPUT)/uffd-unit-tests: uffd-common.c
>> +$(OUTPUT)/hugepage-mremap: uffd-common.c
>> +$(OUTPUT)/write_to_hugetlbfs: uffd-common.c
>> +$(OUTPUT)/ksm_functional_tests: uffd-common.c
>
> Sorry, John, I still cannot follow..
>
> As I said before uffd-common.[ch] was for uffd stress/unit tests. I
> confess my fault to not have named it uffd-test-common.[ch] already.
Actually, given that there is nothing *except* test code in this
directory, I think your original choice of file names is just right.
>
> I think it's fine to keep uffd_*() helpers in vm_util.[ch] for now, until
> it grows. Just like if one day we'll have a pagemap.c test we don't
> necessary need to move pagemap_*() helpers from vm_utils.[ch] into
> pagemap.[ch]. It just keeps common test helpers.
>
> Can we avoid linking those into other tests in whatever way? Maybe
> renaming it to uffd-test-common.[ch] may be cleaner?
>
It sounds like you are suggesting this:
$(OUTPUT)/uffd-stress: uffd-common.c uffd-test-common.c
$(OUTPUT)/uffd-unit-tests: uffd-common.c uffd-test-common.c
$(OUTPUT)/hugepage-mremap: uffd-test-common.c
$(OUTPUT)/write_to_hugetlbfs: uffd-test-common.c
$(OUTPUT)/ksm_functional_tests: uffd-test-common.c
...approximately. Do I have that correct? I can arrange it that way
if you feel it's a better end result. (And it's better than leaving
uffd*() helpers in vm_utils, imho.)
thanks,
--
John Hubbard
NVIDIA
Powered by blists - more mailing lists