Linux virtualization list
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Joerg Roedel <joro@8bytes.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	jon.grimm@amd.com, brijesh.singh@amd.com,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	jfehlig@suse.com, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	linux-block@vger.kernel.org, iommu@lists.linux-foundation.org,
	jroedel@suse.de, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH 5/5] virtio-blk: Consider virtio_max_dma_size() for maximum segment size
Date: Wed, 23 Jan 2019 22:31:39 +0100	[thread overview]
Message-ID: <20190123213139.GD9032__47403.7863825046$1548279157$gmane$org@lst.de> (raw)
In-Reply-To: <20190123163049.24863-6-joro@8bytes.org>

On Wed, Jan 23, 2019 at 05:30:49PM +0100, Joerg Roedel wrote:
> +	max_size = virtio_max_dma_size(vdev);
> +
>  	/* Host can optionally specify maximum segment size and number of
>  	 * segments. */
>  	err = virtio_cread_feature(vdev, VIRTIO_BLK_F_SIZE_MAX,
>  				   struct virtio_blk_config, size_max, &v);
>  	if (!err)
> -		blk_queue_max_segment_size(q, v);
> -	else
> -		blk_queue_max_segment_size(q, -1U);
> +		max_size = min(max_size, v);
> +
> +	blk_queue_max_segment_size(q, max_size);

I wonder if we should just move the dma max segment size check
into blk_queue_max_segment_size so that all block drivers benefit
from it.  Even if not I think at least the SCSI midlayer should
be updated to support it.

Btw, I wonder why virtio-scsi sticks to the default segment size,
unlike virtio-blk.

  parent reply	other threads:[~2019-01-23 21:31 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190123163049.24863-1-joro@8bytes.org>
2019-01-23 16:30 ` [PATCH 1/5] swiotlb: Introduce swiotlb_max_mapping_size() Joerg Roedel
2019-01-23 16:30 ` [PATCH 2/5] swiotlb: Add is_swiotlb_active() function Joerg Roedel
2019-01-23 16:30 ` [PATCH 3/5] dma: Introduce dma_max_mapping_size() Joerg Roedel
2019-01-23 16:30 ` [PATCH 4/5] virtio: Introduce virtio_max_dma_size() Joerg Roedel
2019-01-23 16:30 ` [PATCH 5/5] virtio-blk: Consider virtio_max_dma_size() for maximum segment size Joerg Roedel
2019-01-23 17:09 ` [PATCH 0/5 v3] Fix virtio-blk issue with SWIOTLB Konrad Rzeszutek Wilk
2019-01-23 18:51 ` Michael S. Tsirkin
     [not found] ` <20190123135000-mutt-send-email-mst@kernel.org>
2019-01-23 21:14   ` Konrad Rzeszutek Wilk
     [not found]   ` <20190123211453.GA2474@char.us.oracle.com>
2019-01-28 15:20     ` Michael S. Tsirkin
     [not found]     ` <20190128101852-mutt-send-email-mst@kernel.org>
2019-01-28 15:53       ` Konrad Rzeszutek Wilk
     [not found] ` <20190123163049.24863-3-joro@8bytes.org>
2019-01-23 21:27   ` [PATCH 2/5] swiotlb: Add is_swiotlb_active() function Christoph Hellwig
     [not found]   ` <20190123212755.GA9032@lst.de>
2019-01-24  8:29     ` Joerg Roedel
     [not found]     ` <20190124082923.GI32526@8bytes.org>
2019-01-24  8:41       ` Christoph Hellwig
     [not found]       ` <20190124084107.GA19441@lst.de>
2019-01-24 15:00         ` Joerg Roedel
     [not found]         ` <20190124150000.GN32526@8bytes.org>
2019-01-28 17:19           ` Michael S. Tsirkin
     [not found] ` <20190123163049.24863-2-joro@8bytes.org>
2019-01-23 21:28   ` [PATCH 1/5] swiotlb: Introduce swiotlb_max_mapping_size() Christoph Hellwig
     [not found]   ` <20190123212813.GB9032@lst.de>
2019-01-24  8:24     ` Joerg Roedel
     [not found]     ` <20190124082431.GH32526@8bytes.org>
2019-01-24  8:47       ` Christoph Hellwig
     [not found] ` <20190123163049.24863-4-joro@8bytes.org>
2019-01-23 21:29   ` [PATCH 3/5] dma: Introduce dma_max_mapping_size() Christoph Hellwig
     [not found] ` <20190123163049.24863-6-joro@8bytes.org>
2019-01-23 21:31   ` Christoph Hellwig [this message]
     [not found]   ` <20190123213139.GD9032@lst.de>
2019-01-23 22:25     ` [PATCH 5/5] virtio-blk: Consider virtio_max_dma_size() for maximum segment size Michael S. Tsirkin
2019-01-24  8:40     ` Joerg Roedel
     [not found]     ` <20190124084011.GJ32526@8bytes.org>
2019-01-24  8:42       ` Christoph Hellwig
     [not found]       ` <20190124084221.GB19441@lst.de>
2019-01-24  9:51         ` Joerg Roedel
     [not found]         ` <20190124095150.GL32526@8bytes.org>
2019-01-28  8:05           ` Christoph Hellwig
     [not found]           ` <20190128080526.GA3874@lst.de>
2019-01-28 17:14             ` Michael S. Tsirkin
     [not found]             ` <20190128121407-mutt-send-email-mst@kernel.org>
2019-01-29  7:38               ` Christoph Hellwig
     [not found] <20190129084342.26030-1-joro@8bytes.org>
2019-01-29  8:43 ` Joerg Roedel
     [not found] ` <20190129084342.26030-6-joro@8bytes.org>
2019-01-29 17:13   ` Christoph Hellwig
     [not found] <20190130164007.26497-1-joro@8bytes.org>
2019-01-30 16:40 ` Joerg Roedel
     [not found] <20190131163403.11363-1-joro@8bytes.org>
2019-01-31 16:34 ` Joerg Roedel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='20190123213139.GD9032__47403.7863825046$1548279157$gmane$org@lst.de' \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=brijesh.singh@amd.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jfehlig@suse.com \
    --cc=jon.grimm@amd.com \
    --cc=joro@8bytes.org \
    --cc=jroedel@suse.de \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox