[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <25fehn7xgvqyqgd6zcscsjazzfhktyjrazffyrtbp2oibnhkey@ggobdyv4zxkf>
Date: Fri, 5 Jul 2024 14:41:43 +0200
From: Stefano Garzarella <sgarzare@...hat.com>
To: "Michael S. Tsirkin" <mst@...hat.com>, Cindy Lu <lulu@...hat.com>
Cc: virtualization@...ts.linux.dev, Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
Jason Wang <jasowang@...hat.com>, linux-kernel@...r.kernel.org,
Eugenio PĂ©rez <eperezma@...hat.com>
Subject: Re: [PATCH] vdpa_sim_blk: add `capacity` module parameter
On Fri, Jul 05, 2024 at 07:30:51AM GMT, Michael S. Tsirkin wrote:
>On Fri, Jul 05, 2024 at 01:28:21PM +0200, Stefano Garzarella wrote:
>> The vDPA block simulator always allocated a 128 MiB ram-disk, but some
>> filesystems (e.g. XFS) may require larger minimum sizes (see
>> https://issues.redhat.com/browse/RHEL-45951).
>>
>> So to allow us to test these filesystems, let's add a module parameter
>> to control the size of the simulated virtio-blk devices.
>> The value is mapped directly to the `capacity` field of the virtio-blk
>> configuration space, so it must be expressed in sector numbers of 512
>> bytes.
>>
>> The default value (0x40000) is the same as the previous value, so the
>> behavior without setting `capacity` remains unchanged.
>>
>> Before this patch or with this patch without setting `capacity`:
>> $ modprobe vdpa-sim-blk
>> $ vdpa dev add mgmtdev vdpasim_blk name blk0
>> virtio_blk virtio6: 1/0/0 default/read/poll queues
>> virtio_blk virtio6: [vdb] 262144 512-byte logical blocks (134 MB/128 MiB)
>>
>> After this patch:
>> $ modprobe vdpa-sim-blk capacity=614400
>> $ vdpa dev add mgmtdev vdpasim_blk name blk0
>> virtio_blk virtio6: 1/0/0 default/read/poll queues
>> virtio_blk virtio6: [vdb] 614400 512-byte logical blocks (315 MB/300 MiB)
>>
>> Signed-off-by: Stefano Garzarella <sgarzare@...hat.com>
>
>What a hack. Cindy was working on adding control over config
>space, why can't that be used?
If it can be used easily with virtio-blk device too, it will be great.
@Cindy do you plan to support that changes for a virtio-blk device too?
In the mean time, for the simulator I thought that this change was fine.
It's just used for testing and debugging...
My main question is how to use that when we have `shared_backend` set to
true, since we use that setting to test for example live migration. In
that case, how do we handle the size of the shared ramdisk between
devices?
Thanks,
Stefano
Powered by blists - more mailing lists