Re: [PATCH 02/16] virtio_ring: virtqueue_add_sgs, to add multiple sgs.

From: Rusty Russell
Date: Sun Mar 03 2013 - 17:15:27 EST


Paolo Bonzini <pbonzini@xxxxxxxxxx> writes:

> Il 27/02/2013 12:21, Rusty Russell ha scritto:
>>>> >> Baseline (before add_sgs):
>>>> >> 2.840000-3.040000(2.927292)user
>>>> >>
>>>> >> After add_sgs:
>>>> >> 2.970000-3.150000(3.053750)user
>>>> >>
>>>> >> After simplifying add_buf a little:
>>>> >> 2.950000-3.210000(3.081458)user
>>>> >>
>>>> >> After inlining virtqueue_add/vring_add_indirect:
>>>> >> 2.920000-3.150000(3.026875)user
>>>> >>
>>>> >> After passing in iteration functions (chained vs unchained):
>>>> >> 2.760000-2.970000(2.883542)user
>> Oops. This result (and the next) is bogus. I was playing with -O3, and
>> accidentally left that in :(
>
> Did you check what actually happened that improved speed so much?

No, it was a random aside, I didn't dig into it. Perhaps we should
revisit using -O3 on the entire kernel, or perhaps grab gcc 3.8 and see
how that performs.

But I'm implementing specialized virtqueue_add_outbuf() and
virtqueue_add_inbuf() which seem to get more improvement anyway (except
occasionally I get hangs in my tests, which I'm debugging now...)

Cheers,
Rusty.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/