Re: [Intel-gfx] [PATCH libdrm] drm: Remove create_handle() drm_framebuffer "virtual".

2017-08-10 Thread Emil Velikov
On 10 August 2017 at 20:29, Joe Kniss wrote: > On Wed, Aug 9, 2017 at 4:13 PM, Joe Kniss wrote: >> On Wed, Aug 9, 2017 at 12:14 PM, Noralf Trønnes wrote: >>> >>> Den 09.08.2017 01.42, skrev Joe Kniss: Because all drivers currently use gem objects for framebuffer planes, the virtua

Re: [PATCH 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Richard W.M. Jones
On Fri, Aug 11, 2017 at 12:41:47AM +0300, Michael S. Tsirkin wrote: > On Thu, Aug 10, 2017 at 10:35:11PM +0100, Richard W.M. Jones wrote: > > On Fri, Aug 11, 2017 at 12:31:44AM +0300, Michael S. Tsirkin wrote: > > > Then we probably should fail probe if vq size is too small. > > > > What does this

Re: [PATCH 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Michael S. Tsirkin
On Thu, Aug 10, 2017 at 10:35:11PM +0100, Richard W.M. Jones wrote: > On Fri, Aug 11, 2017 at 12:31:44AM +0300, Michael S. Tsirkin wrote: > > Then we probably should fail probe if vq size is too small. > > What does this mean? > > Rich. We must prevent driver from submitting s/g lists > vq size

Re: [PATCH 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Richard W.M. Jones
On Fri, Aug 11, 2017 at 12:31:44AM +0300, Michael S. Tsirkin wrote: > Then we probably should fail probe if vq size is too small. What does this mean? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.

Re: [PATCH 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Michael S. Tsirkin
On Thu, Aug 10, 2017 at 10:30:38PM +0100, Richard W.M. Jones wrote: > On Fri, Aug 11, 2017 at 12:21:16AM +0300, Michael S. Tsirkin wrote: > > On Thu, Aug 10, 2017 at 05:40:34PM +0100, Richard W.M. Jones wrote: > > > If using indirect descriptors, you can make the total_sg as large as > > > you want

Re: [PATCH 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Richard W.M. Jones
On Fri, Aug 11, 2017 at 12:21:16AM +0300, Michael S. Tsirkin wrote: > On Thu, Aug 10, 2017 at 05:40:34PM +0100, Richard W.M. Jones wrote: > > If using indirect descriptors, you can make the total_sg as large as > > you want. > > That would be a spec violation though, even if it happens to > work o

Re: [PATCH 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Michael S. Tsirkin
On Thu, Aug 10, 2017 at 05:40:34PM +0100, Richard W.M. Jones wrote: > If using indirect descriptors, you can make the total_sg as large as > you want. That would be a spec violation though, even if it happens to work on current QEMU. The spec says: A driver MUST NOT create a descriptor ch

Re: [PATCH v2 2/2] virtio: virtio_scsi: Set can_queue to the length of the virtqueue.

2017-08-10 Thread Paolo Bonzini
On 10/08/2017 18:56, Richard W.M. Jones wrote: > Since switching to blk-mq as the default in commit 5c279bd9e406 > ("scsi: default to scsi-mq"), virtio-scsi LUNs consume about 10x as > much kernel memory. > > qemu currently allocates a fixed 128 entry virtqueue. can_queue > currently is set to 10

[PATCH v2 2/2] virtio: virtio_scsi: Set can_queue to the length of the virtqueue.

2017-08-10 Thread Richard W.M. Jones
Since switching to blk-mq as the default in commit 5c279bd9e406 ("scsi: default to scsi-mq"), virtio-scsi LUNs consume about 10x as much kernel memory. qemu currently allocates a fixed 128 entry virtqueue. can_queue currently is set to 1024. But with indirect descriptors, each command in the que

[PATCH v2 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Richard W.M. Jones
If using indirect descriptors, you can make the total_sg as large as you want. If not, BUG is too serious because the function later returns -ENOSPC. Thanks Paolo Bonzini, Christoph Hellwig. Signed-off-by: Richard W.M. Jones Reviewed-by: Paolo Bonzini --- drivers/virtio/virtio_ring.c | 5 +++-

[PATCH v2 0/2] virtio_scsi: Set can_queue based on size of virtqueue.

2017-08-10 Thread Richard W.M. Jones
v1 was here: https://lkml.org/lkml/2017/8/10/689 v1 -> v2: Remove .can_queue field from the templates. Rich. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualizati

Re: [PATCH 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Paolo Bonzini
On 10/08/2017 18:40, Richard W.M. Jones wrote: > If using indirect descriptors, you can make the total_sg as large as > you want. If not, BUG is too serious because the function later > returns -ENOSPC. > > Thanks Paolo Bonzini, Christoph Hellwig. > > Signed-off-by: Richard W.M. Jones > --- >

Re: [PATCH 2/2] virtio: virtio_scsi: Set can_queue to the length of the virtqueue.

2017-08-10 Thread Paolo Bonzini
On 10/08/2017 18:40, Richard W.M. Jones wrote: > Since switching to blk-mq as the default in commit 5c279bd9e406 > ("scsi: default to scsi-mq"), virtio-scsi LUNs consume about 10x as > much kernel memory. > > qemu currently allocates a fixed 128 entry virtqueue. can_queue > currently is set to 10

[PATCH 2/2] virtio: virtio_scsi: Set can_queue to the length of the virtqueue.

2017-08-10 Thread Richard W.M. Jones
Since switching to blk-mq as the default in commit 5c279bd9e406 ("scsi: default to scsi-mq"), virtio-scsi LUNs consume about 10x as much kernel memory. qemu currently allocates a fixed 128 entry virtqueue. can_queue currently is set to 1024. But with indirect descriptors, each command in the que

[PATCH 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Richard W.M. Jones
If using indirect descriptors, you can make the total_sg as large as you want. If not, BUG is too serious because the function later returns -ENOSPC. Thanks Paolo Bonzini, Christoph Hellwig. Signed-off-by: Richard W.M. Jones --- drivers/virtio/virtio_ring.c | 5 +++-- 1 file changed, 3 inserti

[PATCH 0/2] virtio_scsi: Set can_queue based on size of virtqueue.

2017-08-10 Thread Richard W.M. Jones
Earlier discussion: https://lkml.org/lkml/2017/8/4/601 "Increased memory usage with scsi-mq" Downstream bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1478201 ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://l

Re: [Intel-gfx] [PATCH libdrm] drm: Remove create_handle() drm_framebuffer "virtual".

2017-08-10 Thread Daniel Vetter
On Wed, Aug 09, 2017 at 04:13:05PM -0700, Joe Kniss wrote: > On Wed, Aug 9, 2017 at 12:14 PM, Noralf Trønnes wrote: > > > > Den 09.08.2017 01.42, skrev Joe Kniss: > >> > >> Because all drivers currently use gem objects for framebuffer planes, > >> the virtual create_handle() is not required. This

Re: [virtio-dev] Re: [PATCH v13 4/5] mm: support reporting free page blocks

2017-08-10 Thread Michal Hocko
On Thu 10-08-17 15:38:34, Wei Wang wrote: > On 08/10/2017 03:05 PM, Michal Hocko wrote: > >On Tue 08-08-17 14:34:25, Wei Wang wrote: > >>On 08/08/2017 02:12 PM, Wei Wang wrote: > >>>On 08/03/2017 05:11 PM, Michal Hocko wrote: > On Thu 03-08-17 14:38:18, Wei Wang wrote: > This is just too ug

Re: [virtio-dev] Re: [PATCH v13 4/5] mm: support reporting free page blocks

2017-08-10 Thread Wei Wang
On 08/10/2017 03:05 PM, Michal Hocko wrote: On Tue 08-08-17 14:34:25, Wei Wang wrote: On 08/08/2017 02:12 PM, Wei Wang wrote: On 08/03/2017 05:11 PM, Michal Hocko wrote: On Thu 03-08-17 14:38:18, Wei Wang wrote: This is just too ugly and wrong actually. Never provide struct page pointers outsi

Re: [virtio-dev] Re: [PATCH v13 4/5] mm: support reporting free page blocks

2017-08-10 Thread Michal Hocko
On Tue 08-08-17 14:34:25, Wei Wang wrote: > On 08/08/2017 02:12 PM, Wei Wang wrote: > >On 08/03/2017 05:11 PM, Michal Hocko wrote: > >>On Thu 03-08-17 14:38:18, Wei Wang wrote: > >>This is just too ugly and wrong actually. Never provide struct page > >>pointers outside of the zone->lock. What I've