Re: [PATCH] iommu: Explicitly include correct DT includes

2023-08-07 Thread Robin Murphy
On 14/07/2023 6:46 pm, Rob Herring wrote: The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include pla

Re: [PATCH] iommu: Explicitly include correct DT includes

2023-08-07 Thread Joerg Roedel
On Fri, Jul 14, 2023 at 11:46:39AM -0600, Rob Herring wrote: > drivers/iommu/arm/arm-smmu/arm-smmu-qcom-debug.c | 2 +- > drivers/iommu/arm/arm-smmu/arm-smmu.c| 1 - > drivers/iommu/arm/arm-smmu/qcom_iommu.c | 3 +-- > drivers/iommu/ipmmu-vmsa.c | 1 - >

Re: [PATCH v4 45/48] mm: shrinker: make global slab shrink lockless

2023-08-07 Thread Dave Chinner via Virtualization
On Mon, Aug 07, 2023 at 07:09:33PM +0800, Qi Zheng wrote: > The shrinker_rwsem is a global read-write lock in shrinkers subsystem, > which protects most operations such as slab shrink, registration and > unregistration of shrinkers, etc. This can easily cause problems in the > following cases.

Re: [PATCH v4 44/48] mm: shrinker: add a secondary array for shrinker_info::{map, nr_deferred}

2023-08-07 Thread Dave Chinner via Virtualization
On Mon, Aug 07, 2023 at 07:09:32PM +0800, Qi Zheng wrote: > Currently, we maintain two linear arrays per node per memcg, which are > shrinker_info::map and shrinker_info::nr_deferred. And we need to resize > them when the shrinker_nr_max is exceeded, that is, allocate a new array, > and then copy t

Re: [PATCH v4 45/48] mm: shrinker: make global slab shrink lockless

2023-08-07 Thread Dave Chinner via Virtualization
On Mon, Aug 07, 2023 at 07:09:33PM +0800, Qi Zheng wrote: > diff --git a/include/linux/shrinker.h b/include/linux/shrinker.h > index eb342994675a..f06225f18531 100644 > --- a/include/linux/shrinker.h > +++ b/include/linux/shrinker.h > @@ -4,6 +4,8 @@ > > #include > #include > +#include > +#i

Re: [PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev()

2023-08-07 Thread Jason Wang
On Mon, Aug 7, 2023 at 2:15 PM Xuan Zhuo wrote: > > On Wed, 2 Aug 2023 09:49:31 +0800, Xuan Zhuo > wrote: > > On Tue, 1 Aug 2023 12:17:47 -0400, "Michael S. Tsirkin" > > wrote: > > > On Fri, Jul 28, 2023 at 02:02:33PM +0800, Xuan Zhuo wrote: > > > > On Tue, 25 Jul 2023 19:07:23 +0800, Xuan Zhu

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-08-07 Thread Jason Wang
On Mon, Jul 31, 2023 at 2:30 PM Jason Wang wrote: > > On Thu, Jul 27, 2023 at 5:46 PM Michael S. Tsirkin wrote: > > > > On Thu, Jul 27, 2023 at 04:59:33PM +0800, Jason Wang wrote: > > > > They really shouldn't - any NIC that takes forever to > > > > program will create issues in the networking st

Re: [PATCH v4 46/48] mm: shrinker: make memcg slab shrink lockless

2023-08-07 Thread Dave Chinner via Virtualization
On Mon, Aug 07, 2023 at 07:09:34PM +0800, Qi Zheng wrote: > Like global slab shrink, this commit also uses refcount+RCU method to make > memcg slab shrink lockless. This patch does random code cleanups amongst the actual RCU changes. Can you please move the cleanups to a spearate patch to reduce t

Re: [PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev()

2023-08-07 Thread Xuan Zhuo
On Tue, 8 Aug 2023 10:26:04 +0800, Jason Wang wrote: > On Mon, Aug 7, 2023 at 2:15 PM Xuan Zhuo wrote: > > > > On Wed, 2 Aug 2023 09:49:31 +0800, Xuan Zhuo > > wrote: > > > On Tue, 1 Aug 2023 12:17:47 -0400, "Michael S. Tsirkin" > > > wrote: > > > > On Fri, Jul 28, 2023 at 02:02:33PM +0800, X

Re: [PATCH 1/2] vdpa/mlx5: Fix mr->initialized semantics

2023-08-07 Thread Jason Wang
On Thu, Aug 3, 2023 at 7:40 PM Dragos Tatulea wrote: > > On Thu, 2023-08-03 at 16:03 +0800, Jason Wang wrote: > > On Thu, Aug 3, 2023 at 1:13 AM Dragos Tatulea wrote: > > > > > > The mr->initialized flag is shared between the control vq and data vq > > > part of the mr init/uninit. But if the con

Re: [PATCH 1/2] vdpa/mlx5: Fix mr->initialized semantics

2023-08-07 Thread Jason Wang
On Fri, Aug 4, 2023 at 1:58 AM Si-Wei Liu wrote: > > > > On 8/3/2023 1:03 AM, Jason Wang wrote: > > On Thu, Aug 3, 2023 at 1:13 AM Dragos Tatulea wrote: > >> The mr->initialized flag is shared between the control vq and data vq > >> part of the mr init/uninit. But if the control vq and data vq ge

Re: [PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev()

2023-08-07 Thread Jason Wang
On Tue, Aug 8, 2023 at 10:52 AM Xuan Zhuo wrote: > > On Tue, 8 Aug 2023 10:26:04 +0800, Jason Wang wrote: > > On Mon, Aug 7, 2023 at 2:15 PM Xuan Zhuo wrote: > > > > > > On Wed, 2 Aug 2023 09:49:31 +0800, Xuan Zhuo > > > wrote: > > > > On Tue, 1 Aug 2023 12:17:47 -0400, "Michael S. Tsirkin" >

Re: [PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev()

2023-08-07 Thread Xuan Zhuo
On Tue, 8 Aug 2023 11:08:09 +0800, Jason Wang wrote: > On Tue, Aug 8, 2023 at 10:52 AM Xuan Zhuo wrote: > > > > On Tue, 8 Aug 2023 10:26:04 +0800, Jason Wang wrote: > > > On Mon, Aug 7, 2023 at 2:15 PM Xuan Zhuo > > > wrote: > > > > > > > > On Wed, 2 Aug 2023 09:49:31 +0800, Xuan Zhuo > > > >

Re: [PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev()

2023-08-07 Thread Jason Wang
On Tue, Aug 8, 2023 at 11:12 AM Xuan Zhuo wrote: > > On Tue, 8 Aug 2023 11:08:09 +0800, Jason Wang wrote: > > On Tue, Aug 8, 2023 at 10:52 AM Xuan Zhuo > > wrote: > > > > > > On Tue, 8 Aug 2023 10:26:04 +0800, Jason Wang wrote: > > > > On Mon, Aug 7, 2023 at 2:15 PM Xuan Zhuo > > > > wrote:

Re: [PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev()

2023-08-07 Thread Xuan Zhuo
On Tue, 8 Aug 2023 11:49:08 +0800, Jason Wang wrote: > On Tue, Aug 8, 2023 at 11:12 AM Xuan Zhuo wrote: > > > > On Tue, 8 Aug 2023 11:08:09 +0800, Jason Wang wrote: > > > On Tue, Aug 8, 2023 at 10:52 AM Xuan Zhuo > > > wrote: > > > > > > > > On Tue, 8 Aug 2023 10:26:04 +0800, Jason Wang > >

Re: [PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev()

2023-08-07 Thread Jason Wang
On Tue, Aug 8, 2023 at 11:57 AM Xuan Zhuo wrote: > > On Tue, 8 Aug 2023 11:49:08 +0800, Jason Wang wrote: > > On Tue, Aug 8, 2023 at 11:12 AM Xuan Zhuo > > wrote: > > > > > > On Tue, 8 Aug 2023 11:08:09 +0800, Jason Wang wrote: > > > > On Tue, Aug 8, 2023 at 10:52 AM Xuan Zhuo > > > > wrote:

Re: [PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev()

2023-08-07 Thread Xuan Zhuo
On Tue, 8 Aug 2023 11:59:04 +0800, Jason Wang wrote: > On Tue, Aug 8, 2023 at 11:57 AM Xuan Zhuo wrote: > > > > On Tue, 8 Aug 2023 11:49:08 +0800, Jason Wang wrote: > > > On Tue, Aug 8, 2023 at 11:12 AM Xuan Zhuo > > > wrote: > > > > > > > > On Tue, 8 Aug 2023 11:08:09 +0800, Jason Wang > >

Re: [PATCH] virtio_ring: fix avail_wrap_counter in virtqueue_add_packed

2023-08-07 Thread Jason Wang
On Tue, Aug 8, 2023 at 1:11 PM Yuan Yao wrote: > > In current packed virtqueue implementation, the avail_wrap_counter won't > flip, in the case when the driver supplies a descriptor chain with a > length equals to the queue size; total_sg == vq->packed.vring.num. > > Let’s assume the following sit

Re: [PATCH] virtio_ring: fix avail_wrap_counter in virtqueue_add_packed

2023-08-07 Thread Michael S. Tsirkin
On Tue, Aug 08, 2023 at 01:43:02PM +0800, Jason Wang wrote: > On Tue, Aug 8, 2023 at 1:11 PM Yuan Yao wrote: > > > > In current packed virtqueue implementation, the avail_wrap_counter won't > > flip, in the case when the driver supplies a descriptor chain with a > > length equals to the queue size

Re: [PATCH] virtio_ring: fix avail_wrap_counter in virtqueue_add_packed

2023-08-07 Thread Jason Wang
On Tue, Aug 8, 2023 at 1:59 PM Michael S. Tsirkin wrote: > > On Tue, Aug 08, 2023 at 01:43:02PM +0800, Jason Wang wrote: > > On Tue, Aug 8, 2023 at 1:11 PM Yuan Yao wrote: > > > > > > In current packed virtqueue implementation, the avail_wrap_counter won't > > > flip, in the case when the driver

Re: [PATCH] virtio_ring: fix avail_wrap_counter in virtqueue_add_packed

2023-08-07 Thread Jason Wang
On Tue, Aug 8, 2023 at 1:59 PM Yuan Yao wrote: > > Since there is a check for 0-length chain in code;BUG_ON(total_sg == 0), we > won’t get a 0-length chain in practice. So, I think use (i <= head) makes the > commit as small as possible. Ok, offered ack in other mail. Thanks > > > Best regard