On 05/01/2015 04:48 PM, Paolo Bonzini wrote:


On 01/05/2015 21:55, John Snow wrote:
Where it makes sense, use the new faster primitives.
For generally small reads/writes such as for the PRDT
and FIS packets, stick with the more wasteful but
easier to debug memread/memwrite.

For ahci-test;
With this patch:
real    0m4.802s
user    0m3.506s
sys     0m2.393s

Without this series:
real    0m14.171s
user    0m12.072s
sys     0m12.527s

The overhead of memread is 2, the overhead of base64 is 1.33, also
base64 should have a larger cost of computing each byte.  It doesn't add up.

Could it be simply that calling qtest_send (and hence
vsnprintf+qemu_chr_fe_write_all, neither of which are speed demons) once
per byte is hideously inefficient? :)

Paolo


I wrote a loop to batch the ascii-hex conversion instead of letting printf do it; then ran some more very, very scientific tests:

memset alone:
real    0m10.888s
user    0m9.303s
sys     0m9.146s

send-batching:
real    0m6.541s
user    0m5.027s
sys     0m4.941s

memset+batching+b64:
real    0m3.675s
user    0m2.582s
sys     0m1.718s

So it still seems as if the b64 batching is a strict improvement speed-wise. I'll send the non-b64 batching patch separately later, unless you have thoughts otherwise.

--js

Reply via email to