Message ID | 20230105134416.15853-1-mdoucha@suse.cz |
---|---|
State | Superseded |
Headers | show |
Series | ltp-aiodio.part4: Run DIT000 with only 1 reader process | expand |
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
On 05. 01. 23 16:38, Petr Vorel wrote: > 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.
Hi Martin, > On 05. 01. 23 16:38, Petr Vorel wrote: > > 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. > 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! Reviewed-by: Petr Vorel <pvorel@suse.cz> Kind regards, Petr
diff --git a/runtest/ltp-aiodio.part4 b/runtest/ltp-aiodio.part4 index d88c27a83..c31bef934 100644 --- a/runtest/ltp-aiodio.part4 +++ 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
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. Signed-off-by: Martin Doucha <mdoucha@suse.cz> --- runtest/ltp-aiodio.part4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)