[LTP] [PATCH] ltp-aiodio.part4: Run DIT000 with only 1 reader process

Petr Vorel pvorel@suse.cz
Thu Jan 5 16:38:06 CET 2023


Hi Martin,

> New changes in real-time kernel patchset give high priority to direct I/O
> readers and may cause writes to block indefinitely if there are too many
> reader processes running in parallel. Reduce the number of reader processes
> in DIT000 to 1 which was the dio_truncate default before rewrite to new API.

Correct, before 7a3741679d it was 1:

-int main(void)
+static void run(void)
 {
-	char filename[PATH_MAX];
-	int pid[NUM_CHILDREN];
-	int num_children = 1;
+	char *filename = "file";
+	int filesize = FILE_SIZE;
+	int num_children = NUM_CHILDREN;

> +++ b/runtest/ltp-aiodio.part4
> @@ -56,7 +56,7 @@ ADI007 dio_append
>  ADI008 dio_append
>  ADI009 dio_append
>  #Running dio_truncate
> -DIT000 dio_truncate
> +DIT000 dio_truncate -n 1
>  DIT001 dio_truncate
>  DIT002 dio_truncate
>  #Running dio_read

But I wonder why changing just the first dio_truncate will fix it
(obviously not). Could we detect RT and force -n 1 for it?
(utsname.version should have "PREEMPT RT"). Obviously only from version which
got affected.

Kind regards,
Petr



More information about the ltp mailing list