Skip to contentSkip to conversation

ltp-aiodio.part4: Run DIT000 with only 1 reader process

PATCH Superseded Martin Doucha 2 participants 4 messages Jan 5, 2023

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ltp-aiodio.part4: Run DIT000 with only 1 reader process

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.

---
 runtest/ltp-aiodio.part4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
runtest/ltp-aiodio.part4 +1 -1
index d88c27a83..c31bef934 100644
@@ -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
Signature · 5 lines
2.39.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#1 lore raw

Hi Martin,

Quoted 4 lines

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;

runtest/ltp-aiodio.part4 ADI007 dio_append · line 62

Quoted 10 lines

+++ b/runtest/ltp-aiodio.part4

runtest/ltp-aiodio.part4 +1 -1
@@ -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

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw
Quoted 4 lines · Petr Vorel

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.

It'll fix only one of the three tests. But I like having some direct I/O stress tests for regular kernels so I've modified only one dio_truncate instance. The other can be skipped manually on RT kernels.

But let's add a warning to dio_truncate if it's running on RT kernel with too many children so that users know that the failure is sometimes expected.

Signature · 11 lines
Martin Doucha   [email protected]
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
Reviewed-by
#3 lore raw

Hi Martin,

Quoted 9 lines · Petr Vorel
Quoted 4 lines

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.

It'll fix only one of the three tests. But I like having some direct I/O stress tests for regular kernels so I've modified only one dio_truncate instance. The other can be skipped manually on RT kernels.

Make sense.

Quoted 2 lines

But let's add a warning to dio_truncate if it's running on RT kernel with too many children so that users know that the failure is sometimes expected.

Thank you!

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp