* [LTP] [PATCH v1] Fix synchronization problem with dio tests
@ 2024-01-29 10:14 Andrea Cervesato
2024-01-29 10:32 ` Petr Vorel
2024-01-29 15:01 ` Cyril Hrubis
0 siblings, 2 replies; 5+ messages in thread
From: Andrea Cervesato @ 2024-01-29 10:14 UTC (permalink / raw)
To: ltp
From: Andrea Cervesato <andrea.cervesato@suse.com>
When system is really fast processing I/O syscalls, multiple childrean
running I/O operations might lock the parent, causing
tst_reap_childrean() to stuck. By adding a small usleep at the
end of the reading I/O operations, which are used by dio_append and
dio_read tests, we ensure that system has enough breath to end tests
correctly and to process children exit.
Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
testcases/kernel/io/ltp-aiodio/common.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/testcases/kernel/io/ltp-aiodio/common.h b/testcases/kernel/io/ltp-aiodio/common.h
index 200bbe18e..281072c3b 100644
--- a/testcases/kernel/io/ltp-aiodio/common.h
+++ b/testcases/kernel/io/ltp-aiodio/common.h
@@ -90,6 +90,8 @@ static inline void io_read(const char *filename, int filesize, volatile int *run
if (!*run_child || !tst_remaining_runtime())
goto exit;
}
+
+ usleep(100);
}
exit:
@@ -121,6 +123,8 @@ static inline void io_read_eof(const char *filename, volatile int *run_child)
break;
}
}
+
+ usleep(100);
}
SAFE_CLOSE(fd);
--
2.35.3
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH v1] Fix synchronization problem with dio tests
2024-01-29 10:14 [LTP] [PATCH v1] Fix synchronization problem with dio tests Andrea Cervesato
@ 2024-01-29 10:32 ` Petr Vorel
2024-01-29 15:01 ` Cyril Hrubis
1 sibling, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2024-01-29 10:32 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: ltp
Hi Andrea,
> When system is really fast processing I/O syscalls, multiple childrean
> running I/O operations might lock the parent, causing
> tst_reap_childrean() to stuck. By adding a small usleep at the
> end of the reading I/O operations, which are used by dio_append and
> dio_read tests, we ensure that system has enough breath to end tests
> correctly and to process children exit.
Thanks for fixing this! Test already does some usleep(100).
For a record, this triggered a failure on s39Ox on SLE 15-SP6.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH v1] Fix synchronization problem with dio tests
2024-01-29 10:14 [LTP] [PATCH v1] Fix synchronization problem with dio tests Andrea Cervesato
2024-01-29 10:32 ` Petr Vorel
@ 2024-01-29 15:01 ` Cyril Hrubis
2024-01-29 15:41 ` Andrea Cervesato via ltp
1 sibling, 1 reply; 5+ messages in thread
From: Cyril Hrubis @ 2024-01-29 15:01 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: ltp
Hi!
> When system is really fast processing I/O syscalls, multiple childrean
> running I/O operations might lock the parent, causing
> tst_reap_childrean() to stuck. By adding a small usleep at the
> end of the reading I/O operations, which are used by dio_append and
> dio_read tests, we ensure that system has enough breath to end tests
> correctly and to process children exit.
This does smell like a kernel bug to be honest.
Which test is this? How to reproduce?
> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
> ---
> testcases/kernel/io/ltp-aiodio/common.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/testcases/kernel/io/ltp-aiodio/common.h b/testcases/kernel/io/ltp-aiodio/common.h
> index 200bbe18e..281072c3b 100644
> --- a/testcases/kernel/io/ltp-aiodio/common.h
> +++ b/testcases/kernel/io/ltp-aiodio/common.h
> @@ -90,6 +90,8 @@ static inline void io_read(const char *filename, int filesize, volatile int *run
> if (!*run_child || !tst_remaining_runtime())
> goto exit;
> }
> +
> + usleep(100);
> }
>
> exit:
> @@ -121,6 +123,8 @@ static inline void io_read_eof(const char *filename, volatile int *run_child)
> break;
> }
> }
> +
> + usleep(100);
> }
>
> SAFE_CLOSE(fd);
> --
> 2.35.3
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH v1] Fix synchronization problem with dio tests
2024-01-29 15:01 ` Cyril Hrubis
@ 2024-01-29 15:41 ` Andrea Cervesato via ltp
2024-01-29 17:36 ` Petr Vorel
0 siblings, 1 reply; 5+ messages in thread
From: Andrea Cervesato via ltp @ 2024-01-29 15:41 UTC (permalink / raw)
To: Cyril Hrubis, Andrea Cervesato; +Cc: ltp
Hi!
On 1/29/24 16:01, Cyril Hrubis wrote:
> Hi!
>> When system is really fast processing I/O syscalls, multiple childrean
>> running I/O operations might lock the parent, causing
>> tst_reap_childrean() to stuck. By adding a small usleep at the
>> end of the reading I/O operations, which are used by dio_append and
>> dio_read tests, we ensure that system has enough breath to end tests
>> correctly and to process children exit.
> This does smell like a kernel bug to be honest.
I thought the same at first, but I didn't find issues in the kernel. We
can take a look deeper for sure.
> Which test is this? How to reproduce?
>
>> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
>> ---
>> testcases/kernel/io/ltp-aiodio/common.h | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/testcases/kernel/io/ltp-aiodio/common.h b/testcases/kernel/io/ltp-aiodio/common.h
>> index 200bbe18e..281072c3b 100644
>> --- a/testcases/kernel/io/ltp-aiodio/common.h
>> +++ b/testcases/kernel/io/ltp-aiodio/common.h
>> @@ -90,6 +90,8 @@ static inline void io_read(const char *filename, int filesize, volatile int *run
>> if (!*run_child || !tst_remaining_runtime())
>> goto exit;
>> }
>> +
>> + usleep(100);
>> }
>>
>> exit:
>> @@ -121,6 +123,8 @@ static inline void io_read_eof(const char *filename, volatile int *run_child)
>> break;
>> }
>> }
>> +
>> + usleep(100);
>> }
>>
>> SAFE_CLOSE(fd);
>> --
>> 2.35.3
>>
>>
>> --
>> Mailing list info: https://lists.linux.it/listinfo/ltp
Andrea
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH v1] Fix synchronization problem with dio tests
2024-01-29 15:41 ` Andrea Cervesato via ltp
@ 2024-01-29 17:36 ` Petr Vorel
0 siblings, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2024-01-29 17:36 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: ltp
> Hi!
> On 1/29/24 16:01, Cyril Hrubis wrote:
> > Hi!
> > > When system is really fast processing I/O syscalls, multiple childrean
> > > running I/O operations might lock the parent, causing
> > > tst_reap_childrean() to stuck. By adding a small usleep at the
> > > end of the reading I/O operations, which are used by dio_append and
> > > dio_read tests, we ensure that system has enough breath to end tests
> > > correctly and to process children exit.
> > This does smell like a kernel bug to be honest.
> I thought the same at first, but I didn't find issues in the kernel. We can
> take a look deeper for sure.
> > Which test is this? How to reproduce?
FYI It's ADI000 => dio_append (without params), which is failing on s39Ox on SLE
15-SP6. It runs pretty quickly on other common archs.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-01-29 17:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-29 10:14 [LTP] [PATCH v1] Fix synchronization problem with dio tests Andrea Cervesato
2024-01-29 10:32 ` Petr Vorel
2024-01-29 15:01 ` Cyril Hrubis
2024-01-29 15:41 ` Andrea Cervesato via ltp
2024-01-29 17:36 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox