linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests: mm: fix the incorrect usage() info of khugepaged
@ 2024-10-15  2:02 Nanyong Sun
  2024-10-15  2:34 ` Baolin Wang
  2024-10-17  7:01 ` Anshuman Khandual
  0 siblings, 2 replies; 5+ messages in thread
From: Nanyong Sun @ 2024-10-15  2:02 UTC (permalink / raw)
  To: akpm, shuah, zokeefe
  Cc: linux-mm, linux-kselftest, linux-kernel, wangkefeng.wang

The mount option of tmpfs should be huge=advise, not madvise
which is not supported and may mislead the users.

Fixes: 1b03d0d558a2 ("selftests/vm: add thp collapse file and tmpfs testing")
Signed-off-by: Nanyong Sun <sunnanyong@huawei.com>
---
 tools/testing/selftests/mm/khugepaged.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/mm/khugepaged.c b/tools/testing/selftests/mm/khugepaged.c
index 56d4480e8d3c..8a4d34cce36b 100644
--- a/tools/testing/selftests/mm/khugepaged.c
+++ b/tools/testing/selftests/mm/khugepaged.c
@@ -1091,7 +1091,7 @@ static void usage(void)
 	fprintf(stderr, "\n\t\"file,all\" mem_type requires kernel built with\n");
 	fprintf(stderr,	"\tCONFIG_READ_ONLY_THP_FOR_FS=y\n");
 	fprintf(stderr, "\n\tif [dir] is a (sub)directory of a tmpfs mount, tmpfs must be\n");
-	fprintf(stderr,	"\tmounted with huge=madvise option for khugepaged tests to work\n");
+	fprintf(stderr,	"\tmounted with huge=advise option for khugepaged tests to work\n");
 	fprintf(stderr,	"\n\tSupported Options:\n");
 	fprintf(stderr,	"\t\t-h: This help message.\n");
 	fprintf(stderr,	"\t\t-s: mTHP size, expressed as page order.\n");
-- 
2.33.0



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] selftests: mm: fix the incorrect usage() info of khugepaged
  2024-10-15  2:02 [PATCH] selftests: mm: fix the incorrect usage() info of khugepaged Nanyong Sun
@ 2024-10-15  2:34 ` Baolin Wang
  2024-10-17  7:01 ` Anshuman Khandual
  1 sibling, 0 replies; 5+ messages in thread
From: Baolin Wang @ 2024-10-15  2:34 UTC (permalink / raw)
  To: Nanyong Sun, akpm, shuah, zokeefe
  Cc: linux-mm, linux-kselftest, linux-kernel, wangkefeng.wang



On 2024/10/15 10:02, Nanyong Sun wrote:
> The mount option of tmpfs should be huge=advise, not madvise
> which is not supported and may mislead the users.
> 
> Fixes: 1b03d0d558a2 ("selftests/vm: add thp collapse file and tmpfs testing")
> Signed-off-by: Nanyong Sun <sunnanyong@huawei.com>

LGTM.
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>

> ---
>   tools/testing/selftests/mm/khugepaged.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/mm/khugepaged.c b/tools/testing/selftests/mm/khugepaged.c
> index 56d4480e8d3c..8a4d34cce36b 100644
> --- a/tools/testing/selftests/mm/khugepaged.c
> +++ b/tools/testing/selftests/mm/khugepaged.c
> @@ -1091,7 +1091,7 @@ static void usage(void)
>   	fprintf(stderr, "\n\t\"file,all\" mem_type requires kernel built with\n");
>   	fprintf(stderr,	"\tCONFIG_READ_ONLY_THP_FOR_FS=y\n");
>   	fprintf(stderr, "\n\tif [dir] is a (sub)directory of a tmpfs mount, tmpfs must be\n");
> -	fprintf(stderr,	"\tmounted with huge=madvise option for khugepaged tests to work\n");
> +	fprintf(stderr,	"\tmounted with huge=advise option for khugepaged tests to work\n");
>   	fprintf(stderr,	"\n\tSupported Options:\n");
>   	fprintf(stderr,	"\t\t-h: This help message.\n");
>   	fprintf(stderr,	"\t\t-s: mTHP size, expressed as page order.\n");


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] selftests: mm: fix the incorrect usage() info of khugepaged
  2024-10-15  2:02 [PATCH] selftests: mm: fix the incorrect usage() info of khugepaged Nanyong Sun
  2024-10-15  2:34 ` Baolin Wang
@ 2024-10-17  7:01 ` Anshuman Khandual
  2024-10-17  7:14   ` Andrew Morton
  1 sibling, 1 reply; 5+ messages in thread
From: Anshuman Khandual @ 2024-10-17  7:01 UTC (permalink / raw)
  To: Nanyong Sun, akpm, shuah, zokeefe
  Cc: linux-mm, linux-kselftest, linux-kernel, wangkefeng.wang

On 10/15/24 07:32, Nanyong Sun wrote:
> The mount option of tmpfs should be huge=advise, not madvise
> which is not supported and may mislead the users.

Agreed.

> 
> Fixes: 1b03d0d558a2 ("selftests/vm: add thp collapse file and tmpfs testing")

But nothing is really broken here. This just fixes usage information.
Please drop the "Fixes:".

> Signed-off-by: Nanyong Sun <sunnanyong@huawei.com>
> ---
>  tools/testing/selftests/mm/khugepaged.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/mm/khugepaged.c b/tools/testing/selftests/mm/khugepaged.c
> index 56d4480e8d3c..8a4d34cce36b 100644
> --- a/tools/testing/selftests/mm/khugepaged.c
> +++ b/tools/testing/selftests/mm/khugepaged.c
> @@ -1091,7 +1091,7 @@ static void usage(void)
>  	fprintf(stderr, "\n\t\"file,all\" mem_type requires kernel built with\n");
>  	fprintf(stderr,	"\tCONFIG_READ_ONLY_THP_FOR_FS=y\n");
>  	fprintf(stderr, "\n\tif [dir] is a (sub)directory of a tmpfs mount, tmpfs must be\n");
> -	fprintf(stderr,	"\tmounted with huge=madvise option for khugepaged tests to work\n");
> +	fprintf(stderr,	"\tmounted with huge=advise option for khugepaged tests to work\n");
>  	fprintf(stderr,	"\n\tSupported Options:\n");
>  	fprintf(stderr,	"\t\t-h: This help message.\n");
>  	fprintf(stderr,	"\t\t-s: mTHP size, expressed as page order.\n");

Without the above "Fixes:" tag,

Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] selftests: mm: fix the incorrect usage() info of khugepaged
  2024-10-17  7:01 ` Anshuman Khandual
@ 2024-10-17  7:14   ` Andrew Morton
  2024-10-17  7:20     ` Anshuman Khandual
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2024-10-17  7:14 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: Nanyong Sun, shuah, zokeefe, linux-mm, linux-kselftest,
	linux-kernel, wangkefeng.wang

On Thu, 17 Oct 2024 12:31:31 +0530 Anshuman Khandual <anshuman.khandual@arm.com> wrote:

> On 10/15/24 07:32, Nanyong Sun wrote:
> > The mount option of tmpfs should be huge=advise, not madvise
> > which is not supported and may mislead the users.
> 
> Agreed.
> 
> > 
> > Fixes: 1b03d0d558a2 ("selftests/vm: add thp collapse file and tmpfs testing")
> 
> But nothing is really broken here. This just fixes usage information.

The usage information is broken!

> Please drop the "Fixes:".

Fixes: is appropriate.  It tells people which commit introduced the error.

I don't think it's serious enough to add a cc:stable.  Others might disagree.

> > Signed-off-by: Nanyong Sun <sunnanyong@huawei.com>
> > ---
> >  tools/testing/selftests/mm/khugepaged.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/testing/selftests/mm/khugepaged.c b/tools/testing/selftests/mm/khugepaged.c
> > index 56d4480e8d3c..8a4d34cce36b 100644
> > --- a/tools/testing/selftests/mm/khugepaged.c
> > +++ b/tools/testing/selftests/mm/khugepaged.c
> > @@ -1091,7 +1091,7 @@ static void usage(void)
> >  	fprintf(stderr, "\n\t\"file,all\" mem_type requires kernel built with\n");
> >  	fprintf(stderr,	"\tCONFIG_READ_ONLY_THP_FOR_FS=y\n");
> >  	fprintf(stderr, "\n\tif [dir] is a (sub)directory of a tmpfs mount, tmpfs must be\n");
> > -	fprintf(stderr,	"\tmounted with huge=madvise option for khugepaged tests to work\n");
> > +	fprintf(stderr,	"\tmounted with huge=advise option for khugepaged tests to work\n");
> >  	fprintf(stderr,	"\n\tSupported Options:\n");
> >  	fprintf(stderr,	"\t\t-h: This help message.\n");
> >  	fprintf(stderr,	"\t\t-s: mTHP size, expressed as page order.\n");
> 
> Without the above "Fixes:" tag,
> 
> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>

Thanks.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] selftests: mm: fix the incorrect usage() info of khugepaged
  2024-10-17  7:14   ` Andrew Morton
@ 2024-10-17  7:20     ` Anshuman Khandual
  0 siblings, 0 replies; 5+ messages in thread
From: Anshuman Khandual @ 2024-10-17  7:20 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Nanyong Sun, shuah, zokeefe, linux-mm, linux-kselftest,
	linux-kernel, wangkefeng.wang



On 10/17/24 12:44, Andrew Morton wrote:
> On Thu, 17 Oct 2024 12:31:31 +0530 Anshuman Khandual <anshuman.khandual@arm.com> wrote:
> 
>> On 10/15/24 07:32, Nanyong Sun wrote:
>>> The mount option of tmpfs should be huge=advise, not madvise
>>> which is not supported and may mislead the users.
>> Agreed.
>>
>>> Fixes: 1b03d0d558a2 ("selftests/vm: add thp collapse file and tmpfs testing")
>> But nothing is really broken here. This just fixes usage information.
> The usage information is broken!
> 
>> Please drop the "Fixes:".
> Fixes: is appropriate.  It tells people which commit introduced the error.
> 
> I don't think it's serious enough to add a cc:stable.  Others might disagree.

Alright, usage information is part of the functionality itself.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-10-17  7:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-15  2:02 [PATCH] selftests: mm: fix the incorrect usage() info of khugepaged Nanyong Sun
2024-10-15  2:34 ` Baolin Wang
2024-10-17  7:01 ` Anshuman Khandual
2024-10-17  7:14   ` Andrew Morton
2024-10-17  7:20     ` Anshuman Khandual

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox