Re: [PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index

2017-09-26 Thread Michael S. Tsirkin
On Fri, Sep 22, 2017 at 04:02:32PM +0800, Jason Wang wrote: > This patch introduces vhost_prefetch_desc_indices() which could batch > descriptor indices fetching and used ring updating. This intends to > reduce the cache misses of indices fetching and updating and reduce > cache line bounce when

Re: [PATCH net-next RFC 0/5] batched tx processing in vhost_net

2017-09-26 Thread Michael S. Tsirkin
On Fri, Sep 22, 2017 at 04:02:30PM +0800, Jason Wang wrote: > Hi: > > This series tries to implement basic tx batched processing. This is > done by prefetching descriptor indices and update used ring in a > batch. This intends to speed up used ring updating and improve the > cache utilization.

Re: [PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()

2017-09-26 Thread Michael S. Tsirkin
On Fri, Sep 22, 2017 at 04:02:33PM +0800, Jason Wang wrote: > This patch introduces a helper which just increase the used idx. This > will be used in pair with vhost_prefetch_desc_indices() by batching > code. > > Signed-off-by: Jason Wang > --- > drivers/vhost/vhost.c | 33

Re: [PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing

2017-09-26 Thread Michael S. Tsirkin
On Fri, Sep 22, 2017 at 04:02:35PM +0800, Jason Wang wrote: > This patch implements basic batched processing of tx virtqueue by > prefetching desc indices and updating used ring in a batch. For > non-zerocopy case, vq->heads were used for storing the prefetched > indices and updating used ring. It

Re: [PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()

2017-09-26 Thread Jason Wang
On 2017年09月27日 03:13, Michael S. Tsirkin wrote: On Fri, Sep 22, 2017 at 04:02:33PM +0800, Jason Wang wrote: This patch introduces a helper which just increase the used idx. This will be used in pair with vhost_prefetch_desc_indices() by batching code. Signed-off-by: Jason Wang

Re: [PATCH net-next RFC 0/5] batched tx processing in vhost_net

2017-09-26 Thread Jason Wang
On 2017年09月27日 03:26, Michael S. Tsirkin wrote: On Fri, Sep 22, 2017 at 04:02:30PM +0800, Jason Wang wrote: Hi: This series tries to implement basic tx batched processing. This is done by prefetching descriptor indices and update used ring in a batch. This intends to speed up used ring

Re: [PATCH v1 4/4] KVM/vmx: enable lbr for the guest

2017-09-26 Thread Wei Wang
On 09/27/2017 12:41 AM, Andi Kleen wrote: 1) vCPU context switching and guest side task switching are not identical. That is, when the vCPU is scheduled out, the guest task on the vCPU may not guest task lifetime has nothing to do with this. It's completely independent of what you do here on

Re: [PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing

2017-09-26 Thread Jason Wang
On 2017年09月27日 03:25, Michael S. Tsirkin wrote: On Fri, Sep 22, 2017 at 04:02:35PM +0800, Jason Wang wrote: This patch implements basic batched processing of tx virtqueue by prefetching desc indices and updating used ring in a batch. For non-zerocopy case, vq->heads were used for storing the

Re: [PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index

2017-09-26 Thread Jason Wang
On 2017年09月27日 03:19, Michael S. Tsirkin wrote: On Fri, Sep 22, 2017 at 04:02:32PM +0800, Jason Wang wrote: This patch introduces vhost_prefetch_desc_indices() which could batch descriptor indices fetching and used ring updating. This intends to reduce the cache misses of indices fetching and

Re: [PATCH v1 0/4] Enable LBR for the guest

2017-09-26 Thread Andi Kleen
> On the other side, it seems that the (guest) kernel driver also works > without > the above being supported, should we change it to report error and stop > using the PMU features when the check of the above two fails (at > intel_pmu_init())? You could add the extra check for the LBR code yes,

Re: [PATCH v1 4/4] KVM/vmx: enable lbr for the guest

2017-09-26 Thread Andi Kleen
> 1) vCPU context switching and guest side task switching are not identical. > That is, when the vCPU is scheduled out, the guest task on the vCPU may not guest task lifetime has nothing to do with this. It's completely independent of what you do here on the VCPU level. > run out its time slice

Re: [PATCH net-next RFC 0/5] batched tx processing in vhost_net

2017-09-26 Thread Michael S. Tsirkin
On Fri, Sep 22, 2017 at 04:02:30PM +0800, Jason Wang wrote: > Hi: > > This series tries to implement basic tx batched processing. This is > done by prefetching descriptor indices and update used ring in a > batch. This intends to speed up used ring updating and improve the > cache utilization.

Re: [PATCH v1 0/4] Enable LBR for the guest

2017-09-26 Thread Wei Wang
On 09/25/2017 10:59 PM, Andi Kleen wrote: On Mon, Sep 25, 2017 at 12:44:52PM +0800, Wei Wang wrote: This patch series enables the Last Branch Recording feature for the guest. Instead of trapping each LBR stack MSR access, the MSRs are passthroughed to the guest. Those MSRs are switched (i.e.

Re: [PATCH v1 4/4] KVM/vmx: enable lbr for the guest

2017-09-26 Thread Wei Wang
On 09/25/2017 10:57 PM, Andi Kleen wrote: +static void auto_switch_lbr_msrs(struct vcpu_vmx *vmx) +{ + int i; + struct perf_lbr_stack lbr_stack; + + perf_get_lbr_stack(_stack); + + add_atomic_switch_msr(vmx, MSR_LBR_SELECT, 0, 0); + add_atomic_switch_msr(vmx,

Re: [PATCH v5 REPOST 1/6] hw_random: place mutex around read functions and buffers.

2017-09-26 Thread Pankaj Gupta
> > A bit late to a party, but: > > On Mon, Dec 8, 2014 at 12:50 AM, Amos Kong wrote: > > From: Rusty Russell > > > > There's currently a big lock around everything, and it means that we > > can't query sysfs (eg

Re: [PATCH] KVM: s390: Disable CONFIG_S390_GUEST_OLD_TRANSPORT by default

2017-09-26 Thread Christian Borntraeger
On 09/25/2017 04:45 PM, Thomas Huth wrote: > There is no recent user space application available anymore which still > supports this old virtio transport, so let's disable this by default. > > Signed-off-by: Thomas Huth thanks applied. > --- > arch/s390/Kconfig | 2 +- > 1

Re: [PATCH] KVM: s390: Disable CONFIG_S390_GUEST_OLD_TRANSPORT by default

2017-09-26 Thread Heiko Carstens
On Tue, Sep 26, 2017 at 12:41:41PM +0200, Christian Borntraeger wrote: > > > On 09/26/2017 12:40 PM, Heiko Carstens wrote: > > On Mon, Sep 25, 2017 at 08:37:36PM +0200, Christian Borntraeger wrote: > >> > >> On 09/25/2017 07:54 PM, Halil Pasic wrote: > >>> > >>> > >>> On 09/25/2017 04:45 PM,

Re: [PATCH] KVM: s390: Disable CONFIG_S390_GUEST_OLD_TRANSPORT by default

2017-09-26 Thread Heiko Carstens
On Tue, Sep 26, 2017 at 12:57:26PM +0200, Thomas Huth wrote: > On 26.09.2017 12:47, Heiko Carstens wrote: > > So it's going to be removed with the next merge window. > > Where is the patch? ;) > > Hmm, so far the code was always enabled by default, so in the unlikely > case that somebody is still

Re: [PATCH] KVM: s390: Disable CONFIG_S390_GUEST_OLD_TRANSPORT by default

2017-09-26 Thread Heiko Carstens
On Mon, Sep 25, 2017 at 08:37:36PM +0200, Christian Borntraeger wrote: > > On 09/25/2017 07:54 PM, Halil Pasic wrote: > > > > > > On 09/25/2017 04:45 PM, Thomas Huth wrote: > >> There is no recent user space application available anymore which still > >> supports this old virtio transport, so

Re: [PATCH] KVM: s390: Disable CONFIG_S390_GUEST_OLD_TRANSPORT by default

2017-09-26 Thread Christian Borntraeger
On 09/26/2017 12:40 PM, Heiko Carstens wrote: > On Mon, Sep 25, 2017 at 08:37:36PM +0200, Christian Borntraeger wrote: >> >> On 09/25/2017 07:54 PM, Halil Pasic wrote: >>> >>> >>> On 09/25/2017 04:45 PM, Thomas Huth wrote: There is no recent user space application available anymore which