Re: [RFC]Two ideas to optimize updating irq routing table

2014-03-26 Thread Christian Borntraeger
On 25/03/14 13:37, Paolo Bonzini wrote: Il 25/03/2014 04:19, Gonglei (Arei) ha scritto: Based on discussions in: http://lists.gnu.org/archive/html/qemu-devel/2013-11/threads.html#03322 About KVM_SET_GSI_ROUTING ioctl, I tested changing RCU to SRCU, but unfortunately it looks like SRCU's

RE: [RFC]Two ideas to optimize updating irq routing table

2014-03-26 Thread Gonglei (Arei)
Based on discussions in: http://lists.gnu.org/archive/html/qemu-devel/2013-11/threads.html#03322 About KVM_SET_GSI_ROUTING ioctl, I tested changing RCU to SRCU, but unfortunately it looks like SRCU's grace period is no better than RCU. Really? This is not what Christian Borntraeger

RE: [RFC]Two ideas to optimize updating irq routing table

2014-03-26 Thread Gonglei (Arei)
On my system I have HZ=100 and lots of CPUs. So RCUs every cpu has scheduled is certainly slower than SRCUs algorithm (/* * We use an adaptive strategy for synchronize_srcu() and especially for * synchronize_srcu_expedited(). We spin for a fixed time period * (defined below) to allow

Re: [RFC]Two ideas to optimize updating irq routing table

2014-03-26 Thread Paolo Bonzini
Il 26/03/2014 09:22, Gonglei (Arei) ha scritto: Yes, previously I was using synchronize_srcu, which is not good. When I changed it to synchronize_srcu_expedited, grace period delay is much better than synchronize_srcu. Though in our tests, we can still see some impact of KVM_SET_GSI_ROUTING

Re: [RFC]Two ideas to optimize updating irq routing table

2014-03-26 Thread Christian Borntraeger
On 26/03/14 09:22, Gonglei (Arei) wrote: Without patches, ping time can jump from 0.3ms to 2ms-30ms. With synchronize_srcu patch, ping time is worse. With synchronize_srcu_expedited patch, ping time is overall good, though sometimes ping time jump to 1ms-3ms. Just to understand whats

Re: [RFC]Two ideas to optimize updating irq routing table

2014-03-26 Thread Michael S. Tsirkin
On Wed, Mar 26, 2014 at 08:22:29AM +, Gonglei (Arei) wrote: Based on discussions in: http://lists.gnu.org/archive/html/qemu-devel/2013-11/threads.html#03322 About KVM_SET_GSI_ROUTING ioctl, I tested changing RCU to SRCU, but unfortunately it looks like SRCU's grace period is

Re: [RFC]Two ideas to optimize updating irq routing table

2014-03-25 Thread Paolo Bonzini
Il 25/03/2014 04:19, Gonglei (Arei) ha scritto: Based on discussions in: http://lists.gnu.org/archive/html/qemu-devel/2013-11/threads.html#03322 About KVM_SET_GSI_ROUTING ioctl, I tested changing RCU to SRCU, but unfortunately it looks like SRCU's grace period is no better than RCU. Really?

[RFC]Two ideas to optimize updating irq routing table

2014-03-24 Thread Gonglei (Arei)
Hi, Based on discussions in: http://lists.gnu.org/archive/html/qemu-devel/2013-11/threads.html#03322 About KVM_SET_GSI_ROUTING ioctl, I tested changing RCU to SRCU, but unfortunately it looks like SRCU's grace period is no better than RCU. I haven't got any idea why this, but I suppose the