All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v1] Add more madvise testcases in madvise01
@ 2022-08-24  8:06 Andrea Cervesato via ltp
  2022-10-06 11:53 ` Petr Vorel
  2022-10-17  8:13 ` Richard Palethorpe
  0 siblings, 2 replies; 3+ messages in thread
From: Andrea Cervesato via ltp @ 2022-08-24  8:06 UTC (permalink / raw)
  To: ltp

Added MADV_COLD and MADV_PAGEOUT madvise modes and created two new
testcases in madvise01 for them. Supported by kernel >= 5.4.

Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
 include/lapi/mmap.h                           | 8 ++++++++
 testcases/kernel/syscalls/madvise/madvise01.c | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/include/lapi/mmap.h b/include/lapi/mmap.h
index 12845b76e..49108338b 100644
--- a/include/lapi/mmap.h
+++ b/include/lapi/mmap.h
@@ -66,6 +66,14 @@
 # define MADV_KEEPONFORK 19
 #endif
 
+#ifndef MADV_COLD
+# define MADV_COLD	20
+#endif
+
+#ifndef MADV_PAGEOUT
+# define MADV_PAGEOUT	21
+#endif
+
 #ifndef MAP_FIXED_NOREPLACE
 
 #ifdef __alpha__
diff --git a/testcases/kernel/syscalls/madvise/madvise01.c b/testcases/kernel/syscalls/madvise/madvise01.c
index de5daf34a..ec64a1db3 100644
--- a/testcases/kernel/syscalls/madvise/madvise01.c
+++ b/testcases/kernel/syscalls/madvise/madvise01.c
@@ -55,6 +55,8 @@ static struct tcase {
 	{MADV_FREE,        "MADV_FREE",        &amem},  /* since Linux 4.5 */
 	{MADV_WIPEONFORK,  "MADV_WIPEONFORK",  &amem},  /* since Linux 4.14 */
 	{MADV_KEEPONFORK,  "MADV_KEEPONFORK",  &amem},  /* since Linux 4.14 */
+	{MADV_COLD,        "MADV_COLD",        &amem},  /* since Linux 5.4 */
+	{MADV_PAGEOUT,     "MADV_PAGEOUT",     &amem},  /* since Linux 5.4 */
 
 };
 
-- 
2.35.3


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH v1] Add more madvise testcases in madvise01
  2022-08-24  8:06 [LTP] [PATCH v1] Add more madvise testcases in madvise01 Andrea Cervesato via ltp
@ 2022-10-06 11:53 ` Petr Vorel
  2022-10-17  8:13 ` Richard Palethorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2022-10-06 11:53 UTC (permalink / raw)
  To: Andrea Cervesato
  Cc: Sandeep Patil, Steve Muckle, Minchan Kim, kernel-team, ltp

Hi Andrea,

[ Cc the author of the kernel commit and android folks ]

Obviously correct, thanks!

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

> Added MADV_COLD and MADV_PAGEOUT madvise modes and created two new
> testcases in madvise01 for them. Supported by kernel >= 5.4.



> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
> ---
>  include/lapi/mmap.h                           | 8 ++++++++
>  testcases/kernel/syscalls/madvise/madvise01.c | 2 ++
>  2 files changed, 10 insertions(+)

> diff --git a/include/lapi/mmap.h b/include/lapi/mmap.h
> index 12845b76e..49108338b 100644
> --- a/include/lapi/mmap.h
> +++ b/include/lapi/mmap.h
> @@ -66,6 +66,14 @@
>  # define MADV_KEEPONFORK 19
>  #endif

> +#ifndef MADV_COLD
> +# define MADV_COLD	20
> +#endif
> +
> +#ifndef MADV_PAGEOUT
> +# define MADV_PAGEOUT	21
> +#endif
> +
>  #ifndef MAP_FIXED_NOREPLACE

>  #ifdef __alpha__
> diff --git a/testcases/kernel/syscalls/madvise/madvise01.c b/testcases/kernel/syscalls/madvise/madvise01.c
> index de5daf34a..ec64a1db3 100644
> --- a/testcases/kernel/syscalls/madvise/madvise01.c
> +++ b/testcases/kernel/syscalls/madvise/madvise01.c
> @@ -55,6 +55,8 @@ static struct tcase {
>  	{MADV_FREE,        "MADV_FREE",        &amem},  /* since Linux 4.5 */
>  	{MADV_WIPEONFORK,  "MADV_WIPEONFORK",  &amem},  /* since Linux 4.14 */
>  	{MADV_KEEPONFORK,  "MADV_KEEPONFORK",  &amem},  /* since Linux 4.14 */
> +	{MADV_COLD,        "MADV_COLD",        &amem},  /* since Linux 5.4 */
> +	{MADV_PAGEOUT,     "MADV_PAGEOUT",     &amem},  /* since Linux 5.4 */

>  };

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH v1] Add more madvise testcases in madvise01
  2022-08-24  8:06 [LTP] [PATCH v1] Add more madvise testcases in madvise01 Andrea Cervesato via ltp
  2022-10-06 11:53 ` Petr Vorel
@ 2022-10-17  8:13 ` Richard Palethorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Palethorpe @ 2022-10-17  8:13 UTC (permalink / raw)
  To: Andrea Cervesato; +Cc: ltp

Merged, thanks!

Andrea Cervesato via ltp <ltp@lists.linux.it> writes:

> Added MADV_COLD and MADV_PAGEOUT madvise modes and created two new
> testcases in madvise01 for them. Supported by kernel >= 5.4.
>
> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
> ---
>  include/lapi/mmap.h                           | 8 ++++++++
>  testcases/kernel/syscalls/madvise/madvise01.c | 2 ++
>  2 files changed, 10 insertions(+)
>
> diff --git a/include/lapi/mmap.h b/include/lapi/mmap.h
> index 12845b76e..49108338b 100644
> --- a/include/lapi/mmap.h
> +++ b/include/lapi/mmap.h
> @@ -66,6 +66,14 @@
>  # define MADV_KEEPONFORK 19
>  #endif
>  
> +#ifndef MADV_COLD
> +# define MADV_COLD	20
> +#endif
> +
> +#ifndef MADV_PAGEOUT
> +# define MADV_PAGEOUT	21
> +#endif
> +
>  #ifndef MAP_FIXED_NOREPLACE
>  
>  #ifdef __alpha__
> diff --git a/testcases/kernel/syscalls/madvise/madvise01.c b/testcases/kernel/syscalls/madvise/madvise01.c
> index de5daf34a..ec64a1db3 100644
> --- a/testcases/kernel/syscalls/madvise/madvise01.c
> +++ b/testcases/kernel/syscalls/madvise/madvise01.c
> @@ -55,6 +55,8 @@ static struct tcase {
>  	{MADV_FREE,        "MADV_FREE",        &amem},  /* since Linux 4.5 */
>  	{MADV_WIPEONFORK,  "MADV_WIPEONFORK",  &amem},  /* since Linux 4.14 */
>  	{MADV_KEEPONFORK,  "MADV_KEEPONFORK",  &amem},  /* since Linux 4.14 */
> +	{MADV_COLD,        "MADV_COLD",        &amem},  /* since Linux 5.4 */
> +	{MADV_PAGEOUT,     "MADV_PAGEOUT",     &amem},  /* since Linux 5.4 */
>  
>  };
>  
> -- 
> 2.35.3


-- 
Thank you,
Richard.

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

end of thread, other threads:[~2022-10-17  8:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-24  8:06 [LTP] [PATCH v1] Add more madvise testcases in madvise01 Andrea Cervesato via ltp
2022-10-06 11:53 ` Petr Vorel
2022-10-17  8:13 ` Richard Palethorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.