From: Cyril Hrubis <chrubis@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v1] Fix synchronization problem with dio tests
Date: Mon, 29 Jan 2024 16:01:31 +0100 [thread overview]
Message-ID: <Zbe9y0MHJZezVeFp@rei> (raw)
In-Reply-To: <20240129101448.14463-1-andrea.cervesato@suse.de>
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
next prev parent reply other threads:[~2024-01-29 15:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2024-01-29 15:41 ` Andrea Cervesato via ltp
2024-01-29 17:36 ` Petr Vorel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zbe9y0MHJZezVeFp@rei \
--to=chrubis@suse.cz \
--cc=andrea.cervesato@suse.de \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox