Re: [PATCH v4 0/4] vsock: cancel connect packets when failing to connect

2017-01-05 Thread Peng Tao
On Tue, Dec 13, 2016 at 5:50 PM, Stefan Hajnoczi wrote: > On Mon, Dec 12, 2016 at 08:21:05PM +0800, Peng Tao wrote: >> Currently, if a connect call fails on a signal or timeout (e.g., guest is >> still >> in the process of starting up), we'll just return to caller and leave

[PATCH V4 net-next 3/3] tun: rx batching

2017-01-05 Thread Jason Wang
We can only process 1 packet at one time during sendmsg(). This often lead bad cache utilization under heavy load. So this patch tries to do some batching during rx before submitting them to host network stack. This is done through accepting MSG_MORE as a hint from sendmsg() caller, if it was set,

[PATCH V4 net-next 2/3] vhost_net: tx batching

2017-01-05 Thread Jason Wang
This patch tries to utilize tuntap rx batching by peeking the tx virtqueue during transmission, if there's more available buffers in the virtqueue, set MSG_MORE flag for a hint for backend (e.g tuntap) to batch the packets. Reviewed-by: Stefan Hajnoczi Signed-off-by: Jason

[PATCH V4 net-next 1/3] vhost: better detection of available buffers

2017-01-05 Thread Jason Wang
This patch tries to do several tweaks on vhost_vq_avail_empty() for a better performance: - check cached avail index first which could avoid userspace memory access. - using unlikely() for the failure of userspace access - check vq->last_avail_idx instead of cached avail index as the last step.

[PATCH V4 net-next 0/3] vhost_net tx batching

2017-01-05 Thread Jason Wang
Hi: This series tries to implement tx batching support for vhost. This was done by using MSG_MORE as a hint for under layer socket. The backend (e.g tap) can then batch the packets temporarily in a list and submit it all once the number of bacthed exceeds a limitation. Tests shows obvious

Re: [PATCH net-next] net: make ndo_get_stats64 a void function

2017-01-05 Thread David Miller
From: Stephen Hemminger Date: Thu, 5 Jan 2017 09:31:36 -0800 > The network device operation for reading statistics is only called > in one place, and it ignores the return value. Having a structure > return value is potentially confusing because some future driver

[PATCH net-next] net: make ndo_get_stats64 a void function

2017-01-05 Thread Stephen Hemminger
The network device operation for reading statistics is only called in one place, and it ignores the return value. Having a structure return value is potentially confusing because some future driver could incorrectly assume that the return value was used. Fix all drivers with ndo_get_stats64 to

Re: [PATCH] virtio_blk: avoid DMA to stack for the sense buffer

2017-01-05 Thread Christoph Hellwig
On Thu, Jan 05, 2017 at 11:37:46AM +0100, 王金浦 wrote: > Thanks, so it's only relevant to kernel > 4.9, as CONFIG_VMAP_STACK > only introduced in 4.9 kernel. kernel >= 4.9, but otherwise, yes. ___ Virtualization mailing list

Re: [PATCH] virtio_blk: avoid DMA to stack for the sense buffer

2017-01-05 Thread Christoph Hellwig
On Wed, Jan 04, 2017 at 04:47:03PM +0100, 王金浦 wrote: > This sounds scary. > Could you share how to reproduce it, this should go into stable if > it's the case. Step 1: Build your kernel with CONFIG_VMAP_STACK=y Step 2: issue a SG_IO ioctl, e.g. sg_inq /dev/vda

Re: [PATCH net-next V2 3/3] tun: rx batching

2017-01-05 Thread Stefan Hajnoczi
On Wed, Jan 04, 2017 at 11:03:32AM +0800, Jason Wang wrote: > On 2017年01月03日 21:33, Stefan Hajnoczi wrote: > > On Wed, Dec 28, 2016 at 04:09:31PM +0800, Jason Wang wrote: > > > +static int tun_rx_batched(struct tun_file *tfile, struct sk_buff *skb, > > > + int more) > > > +{ > >