Re: [PATCH v3] virtio: Work around frames incorrectly marked as gso

2020-02-25 Thread Anton Ivanov
On 25/02/2020 16:26, Willem de Bruijn wrote: An skb_dump() + dump_stack() when the packet socket gets such a packet may point us to the root cause and fix that. We tried dump stack, it was not informative - it was just the recvmmsg call stack coming from the UML until it hits the relevant recv

Re: [PATCH V4 5/5] vdpasim: vDPA device simulator

2020-02-25 Thread Jason Wang
On 2020/2/21 下午3:57, Jason Wang wrote: On 2020/2/20 下午11:12, Jason Gunthorpe wrote: On Thu, Feb 20, 2020 at 02:11:41PM +0800, Jason Wang wrote: +static void vdpasim_device_release(struct device *dev) +{ +    struct vdpasim *vdpasim = dev_to_sim(dev); + +    cancel_work_sync(>work); +   

[PATCH V5 5/5] vdpasim: vDPA device simulator

2020-02-25 Thread Jason Wang
This patch implements a software vDPA networking device. The datapath is implemented through vringh and workqueue. The device has an on-chip IOMMU which translates IOVA to PA. For kernel virtio drivers, vDPA simulator driver provides dma_ops. For vhost driers, set_map() methods of vdpa_config_ops

[PATCH V5 4/5] virtio: introduce a vDPA based transport

2020-02-25 Thread Jason Wang
This patch introduces a vDPA transport for virtio. This is used to use kernel virtio driver to drive the vDPA device that is capable of populating virtqueue directly. A new virtio-vdpa driver will be registered to the vDPA bus, when a new virtio-vdpa device is probed, it will register the device

[PATCH V5 3/5] vDPA: introduce vDPA bus

2020-02-25 Thread Jason Wang
vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices are usually implemented through PCIE with the following types: -

[PATCH V5 2/5] vringh: IOTLB support

2020-02-25 Thread Jason Wang
This patch implements the third memory accessor for vringh besides current kernel and userspace accessors. This idea is to allow vringh to do the address translation through an IOTLB which is implemented via vhost_map interval tree. Users should setup and IOVA to PA mapping in this IOTLB. This

[PATCH V5 1/5] vhost: factor out IOTLB

2020-02-25 Thread Jason Wang
This patch factors out IOTLB into a dedicated module in order to be reused by other modules like vringh. User may choose to enable the automatic retiring by specifying VHOST_IOTLB_FLAG_RETIRE flag to fit for the case of vhost device IOTLB implementation. Signed-off-by: Jason Wang ---

[PATCH V5 0/5] vDPA support

2020-02-25 Thread Jason Wang
Hi all: This is an update version of vDPA support in kernel. vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices

Re: [PATCH] virtio_ring: Fix mem leak with vring_new_virtqueue()

2020-02-25 Thread Jason Wang
On 2020/2/26 上午12:51, Suman Anna wrote: Hi Jason, On 2/24/20 11:39 PM, Jason Wang wrote: On 2020/2/25 上午5:26, Suman Anna wrote: The functions vring_new_virtqueue() and __vring_new_virtqueue() are used with split rings, and any allocations within these functions are managed outside of the

Re: [PATCH RFC v4 06/13] mm: Allow to offline unmovable PageOffline() pages via MEM_GOING_OFFLINE

2020-02-25 Thread David Hildenbrand
On 25.02.20 22:46, Alexander Duyck wrote: > On Tue, 2020-02-25 at 19:49 +0100, David Hildenbrand wrote: /* * Scan pfn range [start,end) to find movable/migratable pages (LRU pages, - * non-lru movable pages and hugepages). We scan pfn because it's much - * easier than

Re: [PATCH RFC v4 06/13] mm: Allow to offline unmovable PageOffline() pages via MEM_GOING_OFFLINE

2020-02-25 Thread David Hildenbrand
>> /* >> * Scan pfn range [start,end) to find movable/migratable pages (LRU pages, >> - * non-lru movable pages and hugepages). We scan pfn because it's much >> - * easier than scanning over linked list. This function returns the pfn >> - * of the first found movable page if it's found,

Re: [PATCH 1/2] mm: move force_dma_unencrypted() to mem_encrypt.h

2020-02-25 Thread Cornelia Huck
On Mon, 24 Feb 2020 19:49:53 +0100 Halil Pasic wrote: > On Mon, 24 Feb 2020 14:33:14 +1100 > David Gibson wrote: > > > On Fri, Feb 21, 2020 at 07:07:02PM +0100, Halil Pasic wrote: > > > On Fri, 21 Feb 2020 10:48:15 -0500 > > > "Michael S. Tsirkin" wrote: > > > > > > > On Fri, Feb 21,

Re: [PATCH RFC v4 12/13] mm/vmscan: Export drop_slab() and drop_slab_node()

2020-02-25 Thread David Hildenbrand
On 25.02.20 18:06, Michal Hocko wrote: > On Tue 25-02-20 16:09:29, David Hildenbrand wrote: >> On 25.02.20 15:58, Michal Hocko wrote: >>> On Thu 12-12-19 18:11:36, David Hildenbrand wrote: We already have a way to trigger reclaiming of all reclaimable slab objects from user space (echo 2

Re: [PATCH RFC v4 12/13] mm/vmscan: Export drop_slab() and drop_slab_node()

2020-02-25 Thread Michal Hocko
On Tue 25-02-20 16:09:29, David Hildenbrand wrote: > On 25.02.20 15:58, Michal Hocko wrote: > > On Thu 12-12-19 18:11:36, David Hildenbrand wrote: > >> We already have a way to trigger reclaiming of all reclaimable slab objects > >> from user space (echo 2 > /proc/sys/vm/drop_caches). Let's allow

Re: [PATCH] virtio_ring: Fix mem leak with vring_new_virtqueue()

2020-02-25 Thread Suman Anna via Virtualization
Hi Jason, On 2/24/20 11:39 PM, Jason Wang wrote: > > On 2020/2/25 上午5:26, Suman Anna wrote: >> The functions vring_new_virtqueue() and __vring_new_virtqueue() are used >> with split rings, and any allocations within these functions are managed >> outside of the .we_own_ring flag. The commit

Re: [PATCH v3] virtio: Work around frames incorrectly marked as gso

2020-02-25 Thread Willem de Bruijn
> An skb_dump() + dump_stack() when the packet socket gets such a > packet may point us to the root cause and fix that. > >>> > >>> We tried dump stack, it was not informative - it was just the recvmmsg > >>> call stack coming from the UML until it hits the relevant recv bit in > >>>

Re: [PATCH][next] drm: Replace zero-length array with flexible-array member

2020-02-25 Thread Chris Wilson
Quoting Gustavo A. R. Silva (2020-02-25 14:03:47) > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to declare > variable-length types such as these ones is a flexible array member[1][2], > introduced in C99: I remember

Re: [PATCH RFC v4 12/13] mm/vmscan: Export drop_slab() and drop_slab_node()

2020-02-25 Thread David Hildenbrand
On 25.02.20 15:58, Michal Hocko wrote: > On Thu 12-12-19 18:11:36, David Hildenbrand wrote: >> We already have a way to trigger reclaiming of all reclaimable slab objects >> from user space (echo 2 > /proc/sys/vm/drop_caches). Let's allow drivers >> to also trigger this when they really want to

Re: [PATCH RFC v4 12/13] mm/vmscan: Export drop_slab() and drop_slab_node()

2020-02-25 Thread Michal Hocko
On Thu 12-12-19 18:11:36, David Hildenbrand wrote: > We already have a way to trigger reclaiming of all reclaimable slab objects > from user space (echo 2 > /proc/sys/vm/drop_caches). Let's allow drivers > to also trigger this when they really want to make progress and know what > they are doing.

[PATCH][next] drm: Replace zero-length array with flexible-array member

2020-02-25 Thread Gustavo A. R. Silva
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By

Re: [PATCH RFC v4 08/13] mm/memory_hotplug: Introduce offline_and_remove_memory()

2020-02-25 Thread David Hildenbrand
On 25.02.20 15:11, Michal Hocko wrote: > On Thu 12-12-19 18:11:32, David Hildenbrand wrote: >> virtio-mem wants to offline and remove a memory block once it unplugged >> all subblocks (e.g., using alloc_contig_range()). Let's provide >> an interface to do that from a driver. virtio-mem already

Re: [PATCH][next] drm: Replace zero-length array with flexible-array member

2020-02-25 Thread Jani Nikula
On Tue, 25 Feb 2020, "Gustavo A. R. Silva" wrote: > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to declare > variable-length types such as these ones is a flexible array member[1][2], > introduced in C99: > > struct

Re: [PATCH RFC v4 11/13] mm/vmscan: Move count_vm_event(DROP_SLAB) into drop_slab()

2020-02-25 Thread Michal Hocko
On Thu 12-12-19 18:11:35, David Hildenbrand wrote: > Let's count within the function itself, so every invocation (of future > users) will be counted. > > Cc: Alexander Viro > Cc: Andrew Morton > Cc: linux-fsde...@vger.kernel.org > Signed-off-by: David Hildenbrand Slight inconsistency with the

Re: [PATCH RFC v4 08/13] mm/memory_hotplug: Introduce offline_and_remove_memory()

2020-02-25 Thread Michal Hocko
On Thu 12-12-19 18:11:32, David Hildenbrand wrote: > virtio-mem wants to offline and remove a memory block once it unplugged > all subblocks (e.g., using alloc_contig_range()). Let's provide > an interface to do that from a driver. virtio-mem already supports to > offline partially unplugged

[PATCH v3 1/4] drm/simple-kms: Add drm_simple_encoder_{init, create}()

2020-02-25 Thread Thomas Zimmermann
This patch makes the internal encoder implementation of the simple KMS helpers available to drivers. These simple-encoder helpers initialize an encoder with an empty implementation. This covers the requirements of most of the existing DRM drivers. A call to drm_simple_encoder_create() allocates

[PATCH v3 3/4] drm/mgag200: Use simple encoder

2020-02-25 Thread Thomas Zimmermann
The mgag200 driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. v3: * init pre-allocated encoder with drm_simple_encoder_init() v2: * rebase onto new simple-encoder interface Signed-off-by: Thomas Zimmermann ---

[PATCH v3 4/4] drm/qxl: Use simple encoder

2020-02-25 Thread Thomas Zimmermann
The qxl driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. v2: * rebase onto new simple-encoder interface Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Acked-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 18

[PATCH v3 2/4] drm/ast: Use simple encoder

2020-02-25 Thread Thomas Zimmermann
The ast driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. v2: * rebase onto new simple-encoder interface Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg --- drivers/gpu/drm/ast/ast_drv.h | 6 +-

[PATCH v3 0/4] drm: Provide a simple encoder

2020-02-25 Thread Thomas Zimmermann
Many DRM drivers implement an encoder with an empty implementation. This patchset adds drm_simple_encoder_init(), which can be used by drivers instead. Except for the destroy callback, the simple encoder's implementation is empty. The patchset also converts 4 encoder instances to use the

Re: [PATCH RFC v4 00/13] virtio-mem: paravirtualized memory

2020-02-25 Thread David Hildenbrand
On 29.01.20 10:41, David Hildenbrand wrote: > On 09.01.20 14:48, David Hildenbrand wrote: >> On 12.12.19 18:11, David Hildenbrand wrote: >>> This series is based on latest linux-next. The patches are located at: >>> https://github.com/davidhildenbrand/linux.git virtio-mem-rfc-v4 >>> >>> The

Re: [PATCH v3] virtio: Work around frames incorrectly marked as gso

2020-02-25 Thread Anton Ivanov
On 25/02/2020 07:48, Anton Ivanov wrote: On 24/02/2020 22:22, Willem de Bruijn wrote: On Mon, Feb 24, 2020 at 4:00 PM Anton Ivanov wrote: On 24/02/2020 20:20, Willem de Bruijn wrote: On Mon, Feb 24, 2020 at 2:55 PM Anton Ivanov wrote: On 24/02/2020 19:27, Willem de Bruijn wrote: On

Re: INFO: task hung in lock_sock_nested (2)

2020-02-25 Thread Stefano Garzarella
On Mon, Feb 24, 2020 at 09:44:28PM +0800, Hillf Danton wrote: > > On Mon, 24 Feb 2020 11:08:53 +0100 Stefano Garzarella wrote: > > On Sun, Feb 23, 2020 at 03:50:25PM +0800, Hillf Danton wrote: > > > > > > Seems like vsock needs a word to track lock owner in an attempt to > > > avoid trying to

Re: INFO: task hung in lock_sock_nested (2)

2020-02-25 Thread Stefano Garzarella
On Tue, Feb 25, 2020 at 05:44:03AM +, Dexuan Cui wrote: > > From: Stefano Garzarella > > Sent: Monday, February 24, 2020 2:09 AM > > ... > > > > syz-executor280 D27912 9768 9766 0x > > > > Call Trace: > > > > context_switch kernel/sched/core.c:3386 [inline] > > > >