Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1705484
| From | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: Increased memory usage with scsi-mq |
| Date | 2017-08-07 15:10 +0200 |
| Message-ID | <ubPXd-bV-27@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <ub3zb-37T-7@gated-at.bofh.it> <ub7CN-5Dm-3@gated-at.bofh.it> <ub9EB-6UA-23@gated-at.bofh.it> <ubPaO-83T-23@gated-at.bofh.it> <ubPku-87B-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 07/08/2017 14:27, Richard W.M. Jones wrote: > Also I noticed this code in virtio_scsi.c: > > cmd_per_lun = virtscsi_config_get(vdev, cmd_per_lun) ?: 1; > shost->cmd_per_lun = min_t(u32, cmd_per_lun, shost->can_queue); > > but setting cmd_per_lun (as a qemu virtio-scsi-pci parameter) didn't > seem to make any difference to memory usage. That's because memory depends on shost->can_queue, not shost->cmd_per_lun (see scsi_mq_setup_tags). can_queue should depend on the virtqueue size, which unfortunately can vary for each virtio-scsi device in theory. The virtqueue size is retrieved by drivers/virtio prior to calling vring_create_virtqueue, and in QEMU it is the second argument to virtio_add_queue. For virtio-scsi this is VIRTIO_SCSI_VQ_SIZE, which is 128, so changing can_queue to 128 should be a no brainer. Thanks, Paolo
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Increased memory usage with scsi-mq "Richard W.M. Jones" <rjones@redhat.com> - 2017-08-04 23:10 +0200
Re: Increased memory usage with scsi-mq Christoph Hellwig <hch@lst.de> - 2017-08-05 10:50 +0200
Re: Increased memory usage with scsi-mq "Richard W.M. Jones" <rjones@redhat.com> - 2017-08-05 11:30 +0200
Re: Increased memory usage with scsi-mq Christoph Hellwig <hch@lst.de> - 2017-08-05 15:50 +0200
Re: Increased memory usage with scsi-mq "Richard W.M. Jones" <rjones@redhat.com> - 2017-08-05 18:00 +0200
Re: Increased memory usage with scsi-mq Paolo Bonzini <pbonzini@redhat.com> - 2017-08-07 14:20 +0200
Re: Increased memory usage with scsi-mq "Richard W.M. Jones" <rjones@redhat.com> - 2017-08-07 14:30 +0200
Re: Increased memory usage with scsi-mq Paolo Bonzini <pbonzini@redhat.com> - 2017-08-07 15:10 +0200
Re: Increased memory usage with scsi-mq Christoph Hellwig <hch@lst.de> - 2017-08-09 18:10 +0200
Re: Increased memory usage with scsi-mq Paolo Bonzini <pbonzini@redhat.com> - 2017-08-09 19:00 +0200
Re: Increased memory usage with scsi-mq "Richard W.M. Jones" <rjones@redhat.com> - 2017-08-10 14:30 +0200
Re: Increased memory usage with scsi-mq Paolo Bonzini <pbonzini@redhat.com> - 2017-08-10 15:00 +0200
Re: Increased memory usage with scsi-mq "Richard W.M. Jones" <rjones@redhat.com> - 2017-08-10 16:20 +0200
Re: Increased memory usage with scsi-mq Paolo Bonzini <pbonzini@redhat.com> - 2017-08-10 16:40 +0200
Re: Increased memory usage with scsi-mq "Richard W.M. Jones" <rjones@redhat.com> - 2017-08-10 17:50 +0200
Re: Increased memory usage with scsi-mq Paolo Bonzini <pbonzini@redhat.com> - 2017-08-10 18:10 +0200
csiph-web