[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 09/11] hw/9pfs/9p-synth: avoid n-square issue in synth_rea
From: |
Christian Schoenebeck |
Subject: |
Re: [PATCH v4 09/11] hw/9pfs/9p-synth: avoid n-square issue in synth_readdir() |
Date: |
Thu, 23 Jan 2020 13:40:20 +0100 |
On Donnerstag, 23. Januar 2020 12:13:51 CET Greg Kurz wrote:
> Honestly it doesn't seem to change anything significant for me.
> Mean time calculated over 100 runs:
>
> Without this patch:
>
> [greg@bahia qemu-9p]$ (cd .mbuild-$(stg branch)/obj ; export
> QTEST_QEMU_BINARY='x86_64-softmmu/qemu-system-x86_64'; make all
> tests/qtest/qos-test && for i in {1..100}; do tests/qtest/qos-test -p
> $(tests/qtest/qos-test -l | grep readdir/basic); done) |& awk '/IMPORTANT/
> { print $10 }' | sed -e 's/s//' -e 's/^/n+=1;x+=/;$ascale=6;x/n' | bc
> .055654
>
> With this patch:
>
> [greg@bahia qemu-9p]$ (cd .mbuild-$(stg branch)/obj ; export
> QTEST_QEMU_BINARY='x86_64-softmmu/qemu-system-x86_64'; make all
> tests/qtest/qos-test && for i in {1..100}; do tests/qtest/qos-test -p
> $(tests/qtest/qos-test -l | grep readdir/basic); done) |& awk '/IMPORTANT/
> { print $10 }' | sed -e 's/s//' -e 's/^/n+=1;x+=/;$ascale=6;x/n' | bc
> .058786
:))) Mhmm, that's because you have run this test WITHOUT the actual readdir
optimization patch. In this scenario the readdir latency issue is so bad, that
the driver's n-square issue does not even matter, so same here:
Unoptimized readdir, no n-squre correction hack:
Time client spent for waiting for reply from server: 0.082831s [MOST
IMPORTANT]
Unoptimized readdir, with n-squre correction hack:
Time client spent for waiting for reply from server: 0.082539s [MOST
IMPORTANT]
BUT, now look at this *with* readdir optimization applied:
Optimized readdir, no n-square correction hack:
Time 9p server spent on synth_readdir() I/O only (synth driver): 0.021304s
Time 9p server spent on entire T_readdir request: 0.022033s [IMPORTANT]
Time client spent for waiting for reply from server: 0.022408s [MOST
IMPORTANT]
Optimized readdir, with n-square correction hack:
Time 9p server spent on synth_readdir() I/O only (synth driver): 0.001576s
Time 9p server spent on entire T_readdir request: 0.002244s [IMPORTANT]
Time client spent for waiting for reply from server: 0.002566s [MOST
IMPORTANT]
Got it? :)
I had good reasons for printing out the time spent on raw driver only.
Best regards,
Christian Schoenebeck
- [PATCH v4 00/11] 9pfs: readdir optimization, Christian Schoenebeck, 2020/01/20
- [PATCH v4 10/11] 9pfs: T_readdir latency optimization, Christian Schoenebeck, 2020/01/20
- [PATCH v4 05/11] tests/virtio-9p: added readdir test, Christian Schoenebeck, 2020/01/20
- [PATCH v4 04/11] hw/9pfs/9p-synth: added directory for readdir test, Christian Schoenebeck, 2020/01/20
- [PATCH v4 11/11] hw/9pfs/9p.c: benchmark time on T_readdir request, Christian Schoenebeck, 2020/01/20
- [PATCH v4 09/11] hw/9pfs/9p-synth: avoid n-square issue in synth_readdir(), Christian Schoenebeck, 2020/01/20
- [PATCH v4 02/11] 9pfs: require msize >= 4096, Christian Schoenebeck, 2020/01/20
- [PATCH v4 01/11] tests/virtio-9p: add terminating null in v9fs_string_read(), Christian Schoenebeck, 2020/01/20
- [PATCH v4 07/11] tests/virtio-9p: failing splitted readdir test, Christian Schoenebeck, 2020/01/20
- [PATCH v4 06/11] tests/virtio-9p: added splitted readdir test, Christian Schoenebeck, 2020/01/20