All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-devel@nongnu.org, Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] [PATCH] increase BlockConf.min_io_size type from uint16_t to uint32_t
Date: Tue, 01 May 2012 12:43:26 +0400	[thread overview]
Message-ID: <4F9FA22E.5050309@msgid.tls.msk.ru> (raw)
In-Reply-To: <CAJSP0QWkvTwRh-X3yL4hFYp2vYk3RiP8Ex=DbgUBzpuu8Kk5iw@mail.gmail.com>

On 01.05.2012 12:27, Stefan Hajnoczi wrote:
> On Mon, Apr 30, 2012 at 4:52 PM, Michael Tokarev <mjt@tls.msk.ru> wrote:
>> This value is used currently for virtio-blk only.  It was defined
>> as uint16_t before, which is the same as in kernel<=>user interface
>> (in virtio_blk.h, struct virtio_blk_config).  But the problem is
>> that in kernel<=>user interface the units are sectors (which is
>> usually 512 bytes or more), while in qemu it is in bytes.  However,
>> for, say, md raid5 arrays, it is typical to have actual min_io_size
>> of a host device to be large.  For example, for raid5 device of
>> 3 drives with 64Kb chunk size, that value will be 128Kb, which does
>> not fit in a uint16_t anymore.
>>
>> Increase the value size from 16bits to 32bits for now.
>>
>> But apparently, the kernel<=>user interface needs to be fixed too
>> (while it is much more difficult due to compatibility issues),
>> because even with 512byte units, the 16bit value there will overflow
>> too with quite normal MD RAID configuration.
>>
>> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
>> ---
>>  block.h |    4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Which kernel<=>user interface?

struct virtio_blk_config in virtio_blk.h, which is used to
pass information about block device from (qemu) userspace
to guest kernel.

Besides, it appears that at least minimum_io_size is not used
anywhere in the kernel, -- so, for example, filesystems does
not directly benefit from seeing this information.  But mkfs.xfs
do use it.

> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>

Thanks,

/mjt

  reply	other threads:[~2012-05-01  8:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1335801160-321-1-git-send-email-mjt@msgid.tls.msk.ru>
2012-05-01  8:27 ` [Qemu-devel] [PATCH] increase BlockConf.min_io_size type from uint16_t to uint32_t Stefan Hajnoczi
2012-05-01  8:43   ` Michael Tokarev [this message]
2012-05-02  9:57 ` Kevin Wolf
2012-05-02 10:08   ` Michael Tokarev
2012-05-02 14:35     ` Kevin Wolf
2012-05-02 15:37       ` Michael Tokarev
2012-05-02 15:53         ` Kevin Wolf

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=4F9FA22E.5050309@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=anthony@codemonkey.ws \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.