Re: [PATCH 3/6] virtio_ring: inline internal vring functions more aggressively.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Michael S. Tsirkin" <mst@xxxxxxxxxx> writes:

> On Wed, Mar 06, 2013 at 04:22:09PM +1100, Rusty Russell wrote:
>> We use inline and get gcc to do the right thing inlining the
>> "indirect" traversal functions.  This also means we don't need to
>> clean the sgs.
>> 
>> for i in `seq 50`; do /usr/bin/time -f 'Wall time:%e' ./vringh_test --indirect --eventidx --parallel --fast-vringh; done 2>&1 | stats --trim-outliers:
>> 
>> Before:
>> 	Using CPUS 0 and 3
>> 	Guest: notified 0, pinged 39014-39063(39062)
>> 	Host: notified 39014-39063(39062), pinged 0
>> 	Wall time:1.900000-2.350000(1.921875)
>> 
>> After:
>> 	Using CPUS 0 and 3
>> 	Guest: notified 0, pinged 39062-39063(39063)
>> 	Host: notified 39062-39063(39063), pinged 0
>> 	Wall time:1.760000-2.220000(1.789167)
>> 
>> Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx> 
>
> It's pretty cool that gcc is able to optimize it like this.
> Which gcc version did you use here?

Gcc has done this for quite a while now... I reported a bug about it in
2008: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35728

This was i686-linux-gnu-gcc-4.7 (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2.

Cheers,
Rusty.
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux