Re: [PATCH v2] drm/virtio: Track total GPU memory for virtio driver

2021-01-18 Thread Daniel Vetter
On Tue, Jan 19, 2021 at 12:41 AM Yiwei Zhang wrote: > > On the success of virtio_gpu_object_create, add size of newly allocated > bo to the tracled total_mem. In drm_gem_object_funcs.free, after the gem > bo lost its last refcount, subtract the bo size from the tracked > total_mem if the original

Re: [PATCH net-next v2 6/7] virtio-net, xsk: implement xsk wakeup callback

2021-01-18 Thread Jason Wang
On 2021/1/16 上午10:59, Xuan Zhuo wrote: Since I did not find an interface to directly notify virtio to generate a tx interrupt, I sent some data to trigger a new tx interrupt. Another advantage of this is that the transmission delay will be relatively small, and there is no need to wait for the

RE: [PATCH 0/7] Introduce vdpa management tool

2021-01-18 Thread Parav Pandit
Hi David, > From: David Ahern > Sent: Wednesday, December 9, 2020 4:17 AM > > On 11/26/20 8:53 PM, Jason Wang wrote: > > 1. Where does userspace vdpa tool reside which users can use? > > Ans: vdpa tool can possibly reside in iproute2 [1] as it enables user > > to create vdpa net devices. > >

Re: [PATCH RFC] virtio-blk: support per-device queue depth

2021-01-18 Thread Jason Wang
On 2021/1/18 上午11:58, Joseph Qi wrote: module parameter 'virtblk_queue_depth' was firstly introduced for testing/benchmarking purposes described in commit fc4324b4597c ("virtio-blk: base queue-depth on virtqueue ringsize or module param"). Since we have different virtio-blk devices which have

Re: [PATCH RFC] virtio-blk: support per-device queue depth

2021-01-18 Thread Jason Wang
On 2021/1/19 上午9:33, JeffleXu wrote: On 1/18/21 1:25 PM, Jason Wang wrote: On 2021/1/18 上午11:58, Joseph Qi wrote: module parameter 'virtblk_queue_depth' was firstly introduced for testing/benchmarking purposes described in commit fc4324b4597c ("virtio-blk: base queue-depth on virtqueue

Re: [PATCH RFC] virtio-blk: support per-device queue depth

2021-01-18 Thread Jason Wang
On 2021/1/18 下午2:06, Joseph Qi wrote: Hi Jason, On 1/18/21 1:25 PM, Jason Wang wrote: On 2021/1/18 上午11:58, Joseph Qi wrote: module parameter 'virtblk_queue_depth' was firstly introduced for testing/benchmarking purposes described in commit fc4324b4597c ("virtio-blk: base queue-depth on

Re: [PATCH RFC] virtio-blk: support per-device queue depth

2021-01-18 Thread JeffleXu
On 1/18/21 1:25 PM, Jason Wang wrote: > > On 2021/1/18 上午11:58, Joseph Qi wrote: >> module parameter 'virtblk_queue_depth' was firstly introduced for >> testing/benchmarking purposes described in commit fc4324b4597c >> ("virtio-blk: base queue-depth on virtqueue ringsize or module param"). >>

RE: [PATCH linux-next v3 6/6] vdpa_sim_net: Add support for user supported devices

2021-01-18 Thread Parav Pandit
Hi Michael, Jason, > From: Jason Wang > Sent: Friday, January 15, 2021 11:09 AM > > > Thanks for the clarification. I think we'd better document the above in the > patch that introduces the mac setting from management API. Can we proceed with this patchset? We like to progress next to

Re: [RFC PATCH 0/7] Support for virtio-net hash reporting

2021-01-18 Thread Willem de Bruijn
> > > What it does not give is a type indication, such as > > > VIRTIO_NET_HASH_TYPE_TCPv6. I don't understand how this would be used. > > > In datapaths where the NIC has already computed the four-tuple hash > > > and stored it in skb->hash --the common case for servers--, That

Re: [RFC PATCH v2 00/13] virtio/vsock: introduce SOCK_SEQPACKET support.

2021-01-18 Thread Stefano Garzarella
On Fri, Jan 15, 2021 at 12:59:30PM +0300, stsp wrote: >15.01.2021 08:35, Arseny Krasnov пишет: >> This patchset impelements support of SOCK_SEQPACKET for virtio >>transport. >> As SOCK_SEQPACKET guarantees to save record boundaries, so to >>do it, new packet operation was added: it marks

Re: [RFC PATCH v2 11/13] virtio/vsock: rest of SOCK_SEQPACKET support

2021-01-18 Thread Stefano Garzarella
On Fri, Jan 15, 2021 at 08:44:22AM +0300, Arseny Krasnov wrote: This adds rest of logic for SEQPACKET: 1) Shared functions for packet sending now set valid type of packet according socket type. 2) SEQPACKET specific function like SEQ_BEGIN send and data dequeue. 3) Ops for virtio transport. 4)

Re: [RFC PATCH v2 10/13] virtio/vsock: update receive logic

2021-01-18 Thread Stefano Garzarella
On Fri, Jan 15, 2021 at 08:44:07AM +0300, Arseny Krasnov wrote: This modifies current receive logic for SEQPACKET support: 1) Add 'SEQ_BEGIN' packet to socket's rx queue. 2) Add 'RW' packet to rx queue, but without merging inside buffer of last packet in queue. 3) Perform check for packet type

Re: [RFC PATCH v2 08/13] virtio/vsock: dequeue callback for SOCK_SEQPACKET.

2021-01-18 Thread Stefano Garzarella
On Fri, Jan 15, 2021 at 08:43:24AM +0300, Arseny Krasnov wrote: This adds transport callback and it's logic for SEQPACKET dequeue. Callback fetches RW packets from rx queue of socket until whole record is copied(if user's buffer is full, user is not woken up). This is done to not stall sender,

Re: [PATCH] swiotlb: Validate bounce size in the sync/unmap path

2021-01-18 Thread Konrad Rzeszutek Wilk
On Mon, Jan 18, 2021 at 12:44:58PM +0100, Martin Radev wrote: > On Wed, Jan 13, 2021 at 12:30:17PM +0100, Christoph Hellwig wrote: > > On Tue, Jan 12, 2021 at 04:07:29PM +0100, Martin Radev wrote: > > > The size of the buffer being bounced is not checked if it happens > > > to be larger than the

Re: [RFC PATCH v2 06/13] af_vsock: general support of SOCK_SEQPACKET type.

2021-01-18 Thread Stefano Garzarella
On Fri, Jan 15, 2021 at 08:42:43AM +0300, Arseny Krasnov wrote: This adds socket operations for SOCK_SEQPACKET and adds this type of socket for conditions where SOCK_STREAM is involved because both type of sockets are connect oriented. Signed-off-by: Arseny Krasnov --- net/vmw_vsock/af_vsock.c

Re: [RFC PATCH v2 02/13] af_vsock: separate rx loops for STREAM/SEQPACKET.

2021-01-18 Thread Stefano Garzarella
On Fri, Jan 15, 2021 at 08:40:50AM +0300, Arseny Krasnov wrote: This adds two receive loops: for SOCK_STREAM and SOCK_SEQPACKET. Both are look like twins, but SEQPACKET is a little bit different from STREAM: 1) It doesn't call notify callbacks. 2) It doesn't care about 'SO_SNDLOWAT' and

Re: [RFC PATCH v2 01/13] af_vsock: implement 'vsock_wait_data()'.

2021-01-18 Thread Stefano Garzarella
On Fri, Jan 15, 2021 at 08:40:25AM +0300, Arseny Krasnov wrote: This adds 'vsock_wait_data()' function which is called from user's read syscall and waits until new socket data is arrived. It was based on code from stream dequeue logic and moved to separate function because it will be called both

Re: Change eats memory on my server

2021-01-18 Thread Thomas Zimmermann
Hi Am 18.01.21 um 14:23 schrieb Christian König: Am 18.01.21 um 14:22 schrieb Eli Cohen: On Mon, Jan 18, 2021 at 02:20:49PM +0100, Thomas Zimmermann wrote: Hi Am 18.01.21 um 14:16 schrieb Eli Cohen: On Mon, Jan 18, 2021 at 10:30:56AM +0100, Thomas Zimmermann wrote: Here's the patch against

Re: Change eats memory on my server

2021-01-18 Thread Christian König
Am 18.01.21 um 14:22 schrieb Eli Cohen: On Mon, Jan 18, 2021 at 02:20:49PM +0100, Thomas Zimmermann wrote: Hi Am 18.01.21 um 14:16 schrieb Eli Cohen: On Mon, Jan 18, 2021 at 10:30:56AM +0100, Thomas Zimmermann wrote: Here's the patch against the latest DRM tree. v5.11-rc3 should work as

Re: Change eats memory on my server

2021-01-18 Thread Thomas Zimmermann
Hi Am 18.01.21 um 14:16 schrieb Eli Cohen: On Mon, Jan 18, 2021 at 10:30:56AM +0100, Thomas Zimmermann wrote: Here's the patch against the latest DRM tree. v5.11-rc3 should work as well. I was able to reproduce the memory leak locally and found that the patch fixes it. Please give it a try.

Re: [PATCH net-next v2 5/7] virtio-net, xsk: realize the function of xsk packet sending

2021-01-18 Thread Michael S. Tsirkin
On Mon, Jan 18, 2021 at 05:10:24PM +0800, Jason Wang wrote: > > On 2021/1/16 上午10:59, Xuan Zhuo wrote: > > virtnet_xsk_run will be called in the tx interrupt handling function > > virtnet_poll_tx. > > > > The sending process gets desc from the xsk tx queue, and assembles it to > > send the data.

Re: [PATCH bpf-next] xsk: build skb by page

2021-01-18 Thread Michael S. Tsirkin
On Sat, Jan 16, 2021 at 10:44:53AM +0800, Xuan Zhuo wrote: > This patch is used to construct skb based on page to save memory copy > overhead. > > This has one problem: > > We construct the skb by fill the data page as a frag into the skb. In > this way, the linear space is empty, and the header

Re: [PATCH] VMCI: Enforce queuepair max size for IOCTL_VMCI_QUEUEPAIR_ALLOC

2021-01-18 Thread Stefano Garzarella
+Cc: Norbert Slusarek On Mon, Jan 11, 2021 at 04:18:53AM -0800, Jorgen Hansen wrote: When create the VMCI queue pair tracking data structures on the host side, the IOCTL for creating the VMCI queue pair didn't validate the queue pair size parameters. This change adds checks for this. This

Re: Change eats memory on my server

2021-01-18 Thread Thomas Zimmermann
Hi Am 18.01.21 um 10:13 schrieb Eli Cohen: On Mon, Jan 18, 2021 at 08:54:07AM +0100, Thomas Zimmermann wrote: Hi Am 18.01.21 um 08:43 schrieb Christian König: Hi Eli, have you already tried using kmemleak? This sounds like a leak of memory allocated using kmalloc(), so kmemleak should be

Re: [RFC PATCH 3/7] tun: allow use of BPF_PROG_TYPE_SCHED_CLS program type

2021-01-18 Thread Yuri Benditovich
Hello Alexei, Can you please answer the questions in the last email of this thread? Your comment will be extremely helpful. Thanks On Tue, Jan 12, 2021 at 10:55 PM Yuri Benditovich wrote: > > On Tue, Jan 12, 2021 at 10:40 PM Yuri Benditovich > wrote: > > > > On Tue, Jan 12, 2021 at 9:42 PM

Re: [PATCH net-next v2 5/7] virtio-net, xsk: realize the function of xsk packet sending

2021-01-18 Thread Jason Wang
On 2021/1/16 上午10:59, Xuan Zhuo wrote: virtnet_xsk_run will be called in the tx interrupt handling function virtnet_poll_tx. The sending process gets desc from the xsk tx queue, and assembles it to send the data. Compared with other drivers, a special place is that the page of the data in xsk

Re: [RFC PATCH 0/7] Support for virtio-net hash reporting

2021-01-18 Thread Yuri Benditovich
On Mon, Jan 18, 2021 at 4:46 AM Jason Wang wrote: > > > On 2021/1/17 下午3:57, Yuri Benditovich wrote: > > On Thu, Jan 14, 2021 at 5:39 AM Jason Wang wrote: > >> > >> On 2021/1/13 下午10:33, Willem de Bruijn wrote: > >>> On Tue, Jan 12, 2021 at 11:11 PM Jason Wang wrote: > On 2021/1/13 上午7:47,