Re: [PATCH 1/3] virtio: cache indirect desc for split

2021-10-27 Thread Xuan Zhuo
On Thu, 28 Oct 2021 10:16:10 +0800, Jason Wang wrote: > On Thu, Oct 28, 2021 at 1:07 AM Michael S. Tsirkin wrote: > > > > On Wed, Oct 27, 2021 at 02:19:11PM +0800, Xuan Zhuo wrote: > > > In the case of using indirect, indirect desc must be allocated and > > > released each time, which increases a

Re: [RFC] Add DMA_API support for Virtio devices earlier than VirtIO 1.0

2021-10-27 Thread Michael S. Tsirkin
On Wed, Oct 27, 2021 at 04:28:28PM -0700, Erdem Aktas wrote: > Enable DMA_API for any VirtIO device earlier than Virtio 1.0 which > is the only way for those devices to be configured correctly when > memory access is retricted. > > Virtio devices can use DMA_API to translate guest phsical addresse

Re: [PATCH 2/3] virtio: cache indirect desc for packed

2021-10-27 Thread kernel test robot
Hi Xuan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on horms-ipvs/master] [also build test WARNING on linus/master v5.15-rc7] [cannot apply to mst-vhost/linux-next next-20211027] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

RE: vDPA bus driver selection

2021-10-27 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Thursday, October 28, 2021 1:46 AM > > On Wed, Oct 27, 2021 at 03:21:15PM +, Parav Pandit wrote: > > Hi Stefano, > > > > > From: Stefano Garzarella > > > Sent: Wednesday, October 27, 2021 8:04 PM > > > > > > Hi folks, > > > I was trying to understand if w

Re: [PATCH net-next v2] net: virtio: use eth_hw_addr_set()

2021-10-27 Thread Jason Wang
On Wed, Oct 27, 2021 at 11:31 PM Michael S. Tsirkin wrote: > > On Wed, Oct 27, 2021 at 08:20:12AM -0700, Jakub Kicinski wrote: > > Commit 406f42fa0d3c ("net-next: When a bond have a massive amount > > of VLANs...") introduced a rbtree for faster Ethernet address look > > up. To maintain netdev->de

Re: [PATCH 3/3] virtio-net: enable virtio indirect cache

2021-10-27 Thread Jason Wang
On Thu, Oct 28, 2021 at 9:59 AM Xuan Zhuo wrote: > > On Wed, 27 Oct 2021 08:55:28 -0700, Jakub Kicinski wrote: > > On Wed, 27 Oct 2021 14:19:13 +0800 Xuan Zhuo wrote: > > > +static bool virtio_desc_cache = true; > > > module_param(csum, bool, 0444); > > > module_param(gso, bool, 0444); > > > m

Re: vDPA bus driver selection

2021-10-27 Thread Jason Wang
On Thu, Oct 28, 2021 at 4:16 AM Michael S. Tsirkin wrote: > > On Wed, Oct 27, 2021 at 03:21:15PM +, Parav Pandit wrote: > > Hi Stefano, > > > > > From: Stefano Garzarella > > > Sent: Wednesday, October 27, 2021 8:04 PM > > > > > > Hi folks, > > > I was trying to understand if we have a way to

Re: [PATCH 1/3] virtio: cache indirect desc for split

2021-10-27 Thread Jason Wang
On Thu, Oct 28, 2021 at 1:07 AM Michael S. Tsirkin wrote: > > On Wed, Oct 27, 2021 at 02:19:11PM +0800, Xuan Zhuo wrote: > > In the case of using indirect, indirect desc must be allocated and > > released each time, which increases a lot of cpu overhead. > > > > Here, a cache is added for indirect

Re: [PATCH 3/3] virtio-net: enable virtio indirect cache

2021-10-27 Thread Xuan Zhuo
On Wed, 27 Oct 2021 08:55:28 -0700, Jakub Kicinski wrote: > On Wed, 27 Oct 2021 14:19:13 +0800 Xuan Zhuo wrote: > > +static bool virtio_desc_cache = true; > > module_param(csum, bool, 0444); > > module_param(gso, bool, 0444); > > module_param(napi_tx, bool, 0644); > > +module_param(virtio_desc_

Re: [PATCH 11/11] dax: move bdev_dax_pgoff to fs/dax.c

2021-10-27 Thread Dan Williams
On Sun, Oct 17, 2021 at 9:41 PM Christoph Hellwig wrote: > > No functional changet, but this will allow for a tighter integration s/changet/changes/ > with the iomap code, including possible passing the partition offset s/possible/possibly/ > in the iomap in the future. For now it mostly avoi

Re: [PATCH 10/11] dm-stripe: add a stripe_dax_pgoff helper

2021-10-27 Thread Dan Williams
On Sun, Oct 17, 2021 at 9:41 PM Christoph Hellwig wrote: > > Add a helper to perform the entire remapping for DAX accesses. This > helper open codes bdev_dax_pgoff given that the alignment checks have > already been done by the submitting file system and don't need to be > repeated. Again, looks

Re: [PATCH 09/11] dm-log-writes: add a log_writes_dax_pgoff helper

2021-10-27 Thread Dan Williams
On Sun, Oct 17, 2021 at 9:41 PM Christoph Hellwig wrote: > > Add a helper to perform the entire remapping for DAX accesses. This > helper open codes bdev_dax_pgoff given that the alignment checks have > already been done by the submitting file system and don't need to be > repeated. Looks good.

Re: [PATCH 08/11] dm-linear: add a linear_dax_pgoff helper

2021-10-27 Thread Dan Williams
On Sun, Oct 17, 2021 at 9:41 PM Christoph Hellwig wrote: > > Add a helper to perform the entire remapping for DAX accesses. This > helper open codes bdev_dax_pgoff given that the alignment checks have > already been done by the submitting file system and don't need to be > repeated. Looks good.

Re: [PATCH 1/3] virtio: cache indirect desc for split

2021-10-27 Thread kernel test robot
Hi Xuan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on horms-ipvs/master] [also build test WARNING on linus/master v5.15-rc7 next-20211027] [cannot apply to mst-vhost/linux-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

Re: [PATCH 2/3] virtio: cache indirect desc for packed

2021-10-27 Thread kernel test robot
Hi Xuan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on horms-ipvs/master] [also build test WARNING on linus/master v5.15-rc7] [cannot apply to mst-vhost/linux-next next-20211027] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

Re: [dm-devel] [PATCH 07/11] dax: remove dax_capable

2021-10-27 Thread Dan Williams
On Tue, Oct 19, 2021 at 8:45 AM Darrick J. Wong wrote: > > On Mon, Oct 18, 2021 at 06:40:50AM +0200, Christoph Hellwig wrote: > > Just open code the block size and dax_dev == NULL checks in the callers. > > > > Signed-off-by: Christoph Hellwig > > --- > > drivers/dax/super.c | 36 --

Re: [PATCH 07/11] dax: remove dax_capable

2021-10-27 Thread Dan Williams
I am going to change the subject of this patch to: dax: remove ->dax_supported() On Sun, Oct 17, 2021 at 9:41 PM Christoph Hellwig wrote: > I'll add a bit more background to help others review this. The ->dax_supported() operation arranges for a stack of devices to each answer the question "is

Re: [PATCH 06/11] xfs: factor out a xfs_setup_dax helper

2021-10-27 Thread Dan Williams
On Tue, Oct 19, 2021 at 12:24 AM Christoph Hellwig wrote: > > On Mon, Oct 18, 2021 at 09:43:51AM -0700, Darrick J. Wong wrote: > > > --- a/fs/xfs/xfs_super.c > > > +++ b/fs/xfs/xfs_super.c > > > @@ -339,6 +339,32 @@ xfs_buftarg_is_dax( > > > bdev_nr_sectors(bt->bt_bdev)); > > >

Re: [PATCH 05/11] dax: move the partition alignment check into fs_dax_get_by_bdev

2021-10-27 Thread Dan Williams
On Sun, Oct 17, 2021 at 9:41 PM Christoph Hellwig wrote: > > fs_dax_get_by_bdev is the primary interface to find a dax device for a > block device, so move the partition alignment check there instead of > wiring it up through ->dax_supported. Looks good. > > Signed-off-by: Christoph Hellwig > -

Re: [PATCH 1/3] virtio: cache indirect desc for split

2021-10-27 Thread kernel test robot
Hi Xuan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on horms-ipvs/master] [also build test WARNING on linus/master v5.15-rc7 next-20211027] [cannot apply to mst-vhost/linux-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

Re: [PATCH 04/11] dax: remove the pgmap sanity checks in generic_fsdax_supported

2021-10-27 Thread Dan Williams
On Sun, Oct 17, 2021 at 9:41 PM Christoph Hellwig wrote: > > Drivers that register a dax_dev should make sure it works, no need > to double check from the file system. > > Signed-off-by: Christoph Hellwig > --- > drivers/dax/super.c | 49 + > 1 file ch

Re: [PATCH 03/11] dax: simplify the dax_device <-> gendisk association

2021-10-27 Thread Dan Williams
On Sun, Oct 17, 2021 at 9:41 PM Christoph Hellwig wrote: > > Replace the dax_host_hash with an xarray indexed by the pointer value > of the gendisk, and require explicitl calls from the block drivers that s/explicitl/explicitl/ I've fixed that up locally. > want to associate their gendisk with

Re: [PATCH 02/11] dax: remove CONFIG_DAX_DRIVER

2021-10-27 Thread Dan Williams
On Sun, Oct 17, 2021 at 9:41 PM Christoph Hellwig wrote: > > CONFIG_DAX_DRIVER only selects CONFIG_DAX now, so remove it. Looks good, I don't think an s390 ack is needed for this one. > Signed-off-by: Christoph Hellwig > --- > drivers/dax/Kconfig| 4 > drivers/nvdimm/Kconfig |

Re: [PATCH 01/11] dm: make the DAX support dependend on CONFIG_FS_DAX

2021-10-27 Thread Dan Williams
On Sun, Oct 17, 2021 at 9:41 PM Christoph Hellwig wrote: > > The device mapper DAX support is all hanging off a block device and thus > can't be used with device dax. Make it depend on CONFIG_FS_DAX instead > of CONFIG_DAX_DRIVER. This also means that bdev_dax_pgoff only needs to > be built unde

Re: futher decouple DAX from block devices

2021-10-27 Thread Dan Williams
[ add sfr ] On Sun, Oct 17, 2021 at 9:41 PM Christoph Hellwig wrote: > > Hi Dan, > > this series cleans up and simplifies the association between DAX and block > devices in preparation of allowing to mount file systems directly on DAX > devices without a detour through block devices. So I notice

Re: vDPA bus driver selection

2021-10-27 Thread Michael S. Tsirkin
On Wed, Oct 27, 2021 at 03:21:15PM +, Parav Pandit wrote: > Hi Stefano, > > > From: Stefano Garzarella > > Sent: Wednesday, October 27, 2021 8:04 PM > > > > Hi folks, > > I was trying to understand if we have a way to specify which vDPA bus driver > > (e.g. vhost-vdpa, virtio-vdpa) a device

Re: [PATCH v3 0/4] Add blk_validate_block_size() helper for drivers to validate block size

2021-10-27 Thread Jens Axboe
On Tue, 26 Oct 2021 22:40:11 +0800, Xie Yongji wrote: > The block layer can't support the block size larger than > page size yet, so driver needs to validate the block size > before setting it. Now this validation is done in device drivers > with some duplicated codes. This series tries to add a bl

Re: [PATCH] vhost: Make use of the helper macro kthread_run()

2021-10-27 Thread Mike Christie
On 10/27/21 3:02 PM, Michael S. Tsirkin wrote: > On Thu, Oct 21, 2021 at 04:44:06PM +0800, Cai Huoqing wrote: >> Repalce kthread_create/wake_up_process() with kthread_run() >> to simplify the code. >> >> Signed-off-by: Cai Huoqing > > Pls check how this interacts with Mike Christie's patches. > P

[GIT PULL] virtio: last minute fixes

2021-10-27 Thread Michael S. Tsirkin
The following changes since commit 64222515138e43da1fcf288f0289ef1020427b87: Merge tag 'drm-fixes-2021-10-22' of git://anongit.freedesktop.org/drm/drm (2021-10-21 19:06:08 -1000) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_l

Re: [PATCH] vhost: Make use of the helper macro kthread_run()

2021-10-27 Thread Michael S. Tsirkin
On Thu, Oct 21, 2021 at 04:44:06PM +0800, Cai Huoqing wrote: > Repalce kthread_create/wake_up_process() with kthread_run() > to simplify the code. > > Signed-off-by: Cai Huoqing Pls check how this interacts with Mike Christie's patches. Pls fix up the typo in the commit log. > --- > drivers/vh

Re: [PATCH v3 4/4] virtio-blk: Use blk_validate_block_size() to validate block size

2021-10-27 Thread Michael S. Tsirkin
On Tue, Oct 26, 2021 at 10:40:15PM +0800, Xie Yongji wrote: > The block layer can't support a block size larger than > page size yet. And a block size that's too small or > not a power of two won't work either. If a misconfigured > device presents an invalid block size in configuration space, > it

Re: [PATCH 1/3] virtio: cache indirect desc for split

2021-10-27 Thread Michael S. Tsirkin
On Wed, Oct 27, 2021 at 09:33:46AM -0700, Dongli Zhang wrote: > > > On 10/26/21 11:19 PM, Xuan Zhuo wrote: > > In the case of using indirect, indirect desc must be allocated and > > released each time, which increases a lot of cpu overhead. > > > > Here, a cache is added for indirect. If the num

Re: vDPA bus driver selection

2021-10-27 Thread Michael S. Tsirkin
On Wed, Oct 27, 2021 at 04:33:50PM +0200, Stefano Garzarella wrote: > Hi folks, > I was trying to understand if we have a way to specify which vDPA bus > driver (e.g. vhost-vdpa, virtio-vdpa) a device should use. > IIUC we don't have it, and the first registered driver is used when a > new device i

Re: [PATCH 1/3] virtio: cache indirect desc for split

2021-10-27 Thread Michael S. Tsirkin
On Wed, Oct 27, 2021 at 02:19:11PM +0800, Xuan Zhuo wrote: > In the case of using indirect, indirect desc must be allocated and > released each time, which increases a lot of cpu overhead. > > Here, a cache is added for indirect. If the number of indirect desc to be > applied for is less than VIRT

Re: [PATCH 1/3] virtio: cache indirect desc for split

2021-10-27 Thread Dongli Zhang
On 10/26/21 11:19 PM, Xuan Zhuo wrote: > In the case of using indirect, indirect desc must be allocated and > released each time, which increases a lot of cpu overhead. > > Here, a cache is added for indirect. If the number of indirect desc to be > applied for is less than VIRT_QUEUE_CACHE_DESC

RE: vDPA bus driver selection

2021-10-27 Thread Parav Pandit via Virtualization
Hi Stefano, > From: Stefano Garzarella > Sent: Wednesday, October 27, 2021 9:17 PM > To: Parav Pandit > Cc: Jason Wang ; Michael Tsirkin ; > Linux Virtualization ; Eli Cohen > > Subject: Re: vDPA bus driver selection > > Hi Parav, > > On Wed, Oct 27, 2021 at 03:21:15PM +, Parav Pandit wro

Re: vDPA bus driver selection

2021-10-27 Thread Stefano Garzarella
Hi Parav, On Wed, Oct 27, 2021 at 03:21:15PM +, Parav Pandit wrote: Hi Stefano, From: Stefano Garzarella Sent: Wednesday, October 27, 2021 8:04 PM Hi folks, I was trying to understand if we have a way to specify which vDPA bus driver (e.g. vhost-vdpa, virtio-vdpa) a device should use. II

Re: [PATCH net-next v2] net: virtio: use eth_hw_addr_set()

2021-10-27 Thread Michael S. Tsirkin
On Wed, Oct 27, 2021 at 08:20:12AM -0700, Jakub Kicinski wrote: > Commit 406f42fa0d3c ("net-next: When a bond have a massive amount > of VLANs...") introduced a rbtree for faster Ethernet address look > up. To maintain netdev->dev_addr in this tree we need to make all > the writes to it go through

RE: vDPA bus driver selection

2021-10-27 Thread Parav Pandit via Virtualization
Hi Stefano, > From: Stefano Garzarella > Sent: Wednesday, October 27, 2021 8:04 PM > > Hi folks, > I was trying to understand if we have a way to specify which vDPA bus driver > (e.g. vhost-vdpa, virtio-vdpa) a device should use. > IIUC we don't have it, and the first registered driver is used w

Re: [PATCH net-next] net: virtio: use eth_hw_addr_set()

2021-10-27 Thread Michael S. Tsirkin
On Wed, Oct 27, 2021 at 06:26:40AM -0700, Jakub Kicinski wrote: > On Wed, 27 Oct 2021 03:23:17 -0400 Michael S. Tsirkin wrote: > > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > > > index c501b5974aee..b7f35aff8e82 100644 > > > --- a/drivers/net/virtio_net.c > > > +++ b/driver

vDPA bus driver selection

2021-10-27 Thread Stefano Garzarella
Hi folks, I was trying to understand if we have a way to specify which vDPA bus driver (e.g. vhost-vdpa, virtio-vdpa) a device should use. IIUC we don't have it, and the first registered driver is used when a new device is registered. I was thinking if it makes sense to extend the management API t

Re: drm/virtio: not pin pages on demand

2021-10-27 Thread Gerd Hoffmann
[ Cc'ing Gurchetan Singh ] > Can we follow up on this issue? > > The main pain point with your suggestion is the fact, > that it will cause VirGL protocol breakage and we would > like to avoid this. > > Extending execbuffer ioctl and create_resource ioctl is > more convenient than having the pro

Re: [PATCH 1/3] virtio: cache indirect desc for split

2021-10-27 Thread Xuan Zhuo
On Wed, 27 Oct 2021 04:55:16 -0400, Michael S. Tsirkin wrote: > On Wed, Oct 27, 2021 at 02:19:11PM +0800, Xuan Zhuo wrote: > > In the case of using indirect, indirect desc must be allocated and > > released each time, which increases a lot of cpu overhead. > > > > Here, a cache is added for indire

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-27 Thread Stefan Hajnoczi
On Tue, Oct 26, 2021 at 11:49:37AM -0500, michael.chris...@oracle.com wrote: > On 10/26/21 12:37 AM, Jason Wang wrote: > > Do we need VHOST_VRING_FREE_WORKER? And I wonder if using dedicated ioctls > > are better: > > > > VHOST_VRING_NEW/FREE_WORKER > > VHOST_VRING_ATTACH_WORKER > > > We didn't

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-27 Thread Stefan Hajnoczi
On Wed, Oct 27, 2021 at 10:55:04AM +0800, Jason Wang wrote: > On Tue, Oct 26, 2021 at 11:45 PM Stefan Hajnoczi wrote: > > > > On Tue, Oct 26, 2021 at 01:37:14PM +0800, Jason Wang wrote: > > > > > > 在 2021/10/22 下午1:19, Mike Christie 写道: > > > > This patch allows userspace to create workers and bin

Re: [PATCH 1/3] virtio: cache indirect desc for split

2021-10-27 Thread Michael S. Tsirkin
On Wed, Oct 27, 2021 at 02:19:11PM +0800, Xuan Zhuo wrote: > In the case of using indirect, indirect desc must be allocated and > released each time, which increases a lot of cpu overhead. > > Here, a cache is added for indirect. If the number of indirect desc to be > applied for is less than VIRT

Re: [PATCH net-next] net: virtio: use eth_hw_addr_set()

2021-10-27 Thread Michael S. Tsirkin
On Wed, Oct 27, 2021 at 03:24:55PM +0800, Jason Wang wrote: > On Wed, Oct 27, 2021 at 10:45 AM Jason Wang wrote: > > > > On Wed, Oct 27, 2021 at 1:56 AM Jakub Kicinski wrote: > > > > > > Commit 406f42fa0d3c ("net-next: When a bond have a massive amount > > > of VLANs...") introduced a rbtree for

Re: [PATCH linux-next v7 4/8] vdpa: Enable user to set mac and mtu of vdpa device

2021-10-27 Thread Stefano Garzarella
On Tue, Oct 26, 2021 at 08:55:15PM +0300, Parav Pandit via Virtualization wrote: $ vdpa dev add name bar mgmtdev vdpasim_net mac 00:11:22:33:44:55 mtu 9000 $ vdpa dev config show bar: mac 00:11:22:33:44:55 link up link_announce false mtu 9000 $ vdpa dev config show -jp { "config": { "

Re: [PATCH net-next] net: virtio: use eth_hw_addr_set()

2021-10-27 Thread Jason Wang
On Wed, Oct 27, 2021 at 10:45 AM Jason Wang wrote: > > On Wed, Oct 27, 2021 at 1:56 AM Jakub Kicinski wrote: > > > > Commit 406f42fa0d3c ("net-next: When a bond have a massive amount > > of VLANs...") introduced a rbtree for faster Ethernet address look > > up. To maintain netdev->dev_addr in thi

Re: [PATCH net-next] net: virtio: use eth_hw_addr_set()

2021-10-27 Thread Michael S. Tsirkin
On Tue, Oct 26, 2021 at 10:56:34AM -0700, Jakub Kicinski wrote: > Commit 406f42fa0d3c ("net-next: When a bond have a massive amount > of VLANs...") introduced a rbtree for faster Ethernet address look > up. To maintain netdev->dev_addr in this tree we need to make all > the writes to it go through