From: Max Reitz <mreitz@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Eric Blake <eblake@redhat.com>, Alberto Garcia <berto@igalia.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [RFC] Proposed qcow2 extension: subcluster allocation
Date: Tue, 11 Apr 2017 17:29:48 +0200 [thread overview]
Message-ID: <5fff2f1d-b105-8ca3-d3dc-0f167b1077fe@redhat.com> (raw)
In-Reply-To: <20170411152922.GP4516@noname.str.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2363 bytes --]
On 11.04.2017 17:29, Kevin Wolf wrote:
> Am 11.04.2017 um 17:18 hat Max Reitz geschrieben:
>> On 11.04.2017 17:08, Eric Blake wrote:
>>> On 04/11/2017 09:59 AM, Max Reitz wrote:
>>>
>>>>
>>>> Good point, but that also means that (with (2)) you can only use
>>>> subcluster configurations where the L2 entry size increases by a power
>>>> of two. Unfortunately, only one of those configurations itself is a
>>>> power of two, and that is 32.
>>>>
>>>> (With 32 subclusters, you take up 64 bits, which means an L2 entry will
>>>> take 128 bits; with any higher 2^n, you'd take up 2^{n+1} bits and the
>>>> L2 entry would take 2^{n+1} + 64 which is impossible to be a power of two.)
>>>
>>> Or we add padding. If you want 64 subclusters, you burn 256 bits per> entry, even though only 192 of those bits are used.
>>
>> Hm, yeah, although you have to keep in mind that the padding is almost
>> pretty much the same as the the data bits we need, effectively doubling
>> the size of the L2 tables:
>>
>> padding = 2^{n+2} - 2^{n+1} - 64 (=2^6)
>> = 2^{n+1} - 64
>>
>> So that's not so nice, but if it's the only thing we can do...
>>
>>>> I don't know how useful non-power-of-two subcluster configurations are.
>>>> Probably not at all.
>>>>
>>>> Since using subcluster would always result in the L2 table taking more
>>>> than 512 bytes, you could therefore never guarantee that there is no
>>>> entry overlapping a sector border (except with 32 subclusters).
>>>
>>> Yes, there's definite benefits to keeping whatever structure we end up
>>> with aligned so that it naturally falls into sector boundaries, even if
>>> it means more padding bits.
>>
>> Then again, I'm not even sure we really need atomicity for L2 entries +
>> subcluster bits. I don't think you'd ever have to modify both at the
>> same time (if you just say the subclusters are all unallocated when
>> allocating the cluster itself, and then you write which subclusters are
>> actually allocated afterwards)).
>>
>> (This also applies to your remark on caching, I think.)
>>
>> Atomicity certainly makes things easier, though.
>
> Unless you want to deal with ordering (i.e. on cluster allocation, first
> update the subcluster bitmap, then flush, then add the L2 entry), I
> think you need atomicity.
Yes, that's what I meant.
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
next prev parent reply other threads:[~2017-04-11 15:30 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 15:01 [Qemu-devel] [RFC] Proposed qcow2 extension: subcluster allocation Alberto Garcia
2017-04-06 16:40 ` Eric Blake
2017-04-07 8:49 ` Alberto Garcia
2017-04-07 12:41 ` Kevin Wolf
2017-04-07 14:24 ` Alberto Garcia
2017-04-21 21:09 ` [Qemu-devel] proposed qcow2 extension: cluster reservations [was: " Eric Blake
2017-04-22 17:56 ` Max Reitz
2017-04-24 11:45 ` Kevin Wolf
2017-04-24 12:46 ` Alberto Garcia
2017-04-07 12:20 ` [Qemu-devel] " Stefan Hajnoczi
2017-04-07 12:24 ` Alberto Garcia
2017-04-07 13:01 ` Kevin Wolf
2017-04-10 15:32 ` Stefan Hajnoczi
2017-04-07 17:10 ` Max Reitz
2017-04-10 8:42 ` Kevin Wolf
2017-04-10 15:03 ` Max Reitz
2017-04-11 12:56 ` Alberto Garcia
2017-04-11 14:04 ` Max Reitz
2017-04-11 14:31 ` Alberto Garcia
2017-04-11 14:45 ` [Qemu-devel] [Qemu-block] " Eric Blake
2017-04-12 12:41 ` Alberto Garcia
2017-04-12 14:10 ` Max Reitz
2017-04-13 8:05 ` Alberto Garcia
2017-04-13 9:02 ` Kevin Wolf
2017-04-13 9:05 ` Alberto Garcia
2017-04-11 14:49 ` [Qemu-devel] " Kevin Wolf
2017-04-11 14:58 ` Eric Blake
2017-04-11 14:59 ` Max Reitz
2017-04-11 15:08 ` Eric Blake
2017-04-11 15:18 ` Max Reitz
2017-04-11 15:29 ` Kevin Wolf
2017-04-11 15:29 ` Max Reitz [this message]
2017-04-11 15:30 ` Eric Blake
2017-04-11 15:34 ` Max Reitz
2017-04-12 12:47 ` Alberto Garcia
2017-04-12 16:54 ` Denis V. Lunev
2017-04-13 11:58 ` Alberto Garcia
2017-04-13 12:44 ` Denis V. Lunev
2017-04-13 13:05 ` Kevin Wolf
2017-04-13 13:09 ` Denis V. Lunev
2017-04-13 13:36 ` Alberto Garcia
2017-04-13 14:06 ` Denis V. Lunev
2017-04-13 13:21 ` Alberto Garcia
2017-04-13 13:30 ` Denis V. Lunev
2017-04-13 13:59 ` Kevin Wolf
2017-04-13 15:04 ` Alberto Garcia
2017-04-13 15:17 ` Denis V. Lunev
2017-04-18 11:52 ` Alberto Garcia
2017-04-18 17:27 ` Denis V. Lunev
2017-04-13 13:51 ` Kevin Wolf
2017-04-13 14:15 ` Alberto Garcia
2017-04-13 14:27 ` Kevin Wolf
2017-04-13 16:42 ` [Qemu-devel] [Qemu-block] " Roman Kagan
2017-04-13 14:42 ` [Qemu-devel] " Denis V. Lunev
2017-04-12 17:55 ` Denis V. Lunev
2017-04-12 18:20 ` Eric Blake
2017-04-12 19:02 ` Denis V. Lunev
2017-04-13 9:44 ` Kevin Wolf
2017-04-13 10:19 ` Denis V. Lunev
2017-04-14 1:06 ` [Qemu-devel] [Qemu-block] " John Snow
2017-04-14 4:17 ` Denis V. Lunev
2017-04-18 11:22 ` Kevin Wolf
2017-04-18 17:30 ` Denis V. Lunev
2017-04-14 7:40 ` Roman Kagan
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=5fff2f1d-b105-8ca3-d3dc-0f167b1077fe@redhat.com \
--to=mreitz@redhat.com \
--cc=berto@igalia.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).