Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1705484
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Paolo Bonzini <pbonzini@redhat.com> |
| Newsgroups | linux.kernel |
| Subject | Re: Increased memory usage with scsi-mq |
| Date | Mon, 07 Aug 2017 15:10:03 +0200 |
| Message-ID | <ubPXd-bV-27@gated-at.bofh.it> (permalink) |
| References | <uaS14-3Oj-21@gated-at.bofh.it> <ub2Wt-2Co-1@gated-at.bofh.it> <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> |
| X-Original-To | "Richard W.M. Jones" <rjones@redhat.com> |
| Dmarc-Filter | OpenDMARC Filter v1.3.2 mx1.redhat.com 9729D7F405 |
| Authentication-Results | ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com |
| Authentication-Results | ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=pbonzini@redhat.com |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Language | en-US |
| Content-Transfer-Encoding | 8bit |
| X-Scanned-By | MIMEDefang 2.79 on 10.5.11.12 |
| X-Greylist | Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 07 Aug 2017 13:07:51 +0000 (UTC) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 23 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Christoph Hellwig <hch@lst.de>, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, "Martin K. Petersen" <martin.petersen@oracle.com> |
| X-Original-Date | Mon, 7 Aug 2017 15:07:48 +0200 |
| X-Original-Message-ID | <ffc29e81-ff6b-7132-2e90-86b5632098fb@redhat.com> |
| X-Original-References | <20170804210035.GA10017@redhat.com> <20170805084436.GA14264@lst.de> <20170805092704.GD20914@redhat.com> <20170805133954.GA17694@lst.de> <20170805155103.GE20914@redhat.com> <b133b97e-9660-ba9b-51de-39fa23fce903@redhat.com> <20170807122701.GH20914@redhat.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1705484 |
Show key headers only | View raw
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