From: Peter Lieven <pl@kamp.de>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Fam Zheng <famz@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>,
qemu-block@nongnu.org, qemu-devel@nongnu.org,
stefanha@redhat.com, mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH V2] block/io: optimize bdrv_co_pwritev for small requests
Date: Mon, 30 May 2016 11:53:22 +0200 [thread overview]
Message-ID: <574C0D92.5090302@kamp.de> (raw)
In-Reply-To: <20160530094719.GC4436@noname.str.redhat.com>
Am 30.05.2016 um 11:47 schrieb Kevin Wolf:
> Am 30.05.2016 um 11:30 hat Peter Lieven geschrieben:
>> Am 30.05.2016 um 10:24 schrieb Kevin Wolf:
>>> Am 30.05.2016 um 08:25 hat Peter Lieven geschrieben:
>>>> Am 27.05.2016 um 10:55 schrieb Kevin Wolf:
>>>>> Am 27.05.2016 um 02:36 hat Fam Zheng geschrieben:
>>>>>> On Thu, 05/26 11:20, Paolo Bonzini wrote:
>>>>>>> On 26/05/2016 10:30, Fam Zheng wrote:
>>>>>>>>>> This doesn't look too wrong... Should the right sequence of events be
>>>>>>>>>> head/after_head or head/after_tail? It's probably simplest to just emit
>>>>>>>>>> all four events.
>>>>>>>> I've no idea. (That's why I leaned towards fixing the test case).
>>>>>>> Well, fixing the testcase means knowing what events should be emitted.
>>>>>>>
>>>>>>> QEMU with Peter's patch emits head/after_head. If the right one is
>>>>>>> head/after_tail, _both QEMU and the testcase_ need to be adjusted. Your
>>>>>>> patch keeps the backwards-compatible route.
>>>>>> Yes, I mean I was not very convinced in tweaking the events at all: each pair
>>>>>> of them has been emitted around bdrv_aligned_preadv(), and the new branch
>>>>>> doesn't do it anymore. So I don't see a reason to add events here.
>>>>> Yes, if you can assume that anyone who uses the debug events know
>>>>> exactly what the code looks like, adding the events here is pointless
>>>>> because TAIL, AFTER_TAIL and for the greatest part also AFTER_HEAD are
>>>>> essentially the same then.
>>>>>
>>>>> Having TAIL before the qiov change and AFTER_TAIL afterwards doesn't
>>>>> make any difference, they could (and should) be called immediately one
>>>>> after another if we wanted to keep the behaviour.
>>>>>
>>>>> I would agree that we should take a look at the test case and what it
>>>>> actually wants to achieve before we can decide whether AFTER_HEAD and
>>>>> TAIL/AFTER_TAIL would be the same (the former could trigger earlier if
>>>>> there are two requests and only one is unaligned at the tail). Maybe we
>>>>> even need to extend the test case now so that both paths (explicit read
>>>>> of the tail and the shortcut) are covered.
>>>> The part that actually blocks in 077 is
>>>>
>>>> # Sequential RMW requests on the same physical sector
>>>>
>>>> its expecting all 4 events around the RMW cycle.
>>>>
>>>> However, it seems that also other parts of 077 would need an adjustment
>>>> and the output might differ depending on the alignment. So I guess we
>>>> have to emit the events if we don't want to recode the whole 077 and make
>>>> it aware of the alignment.
>>> Yes, but my point is that we may need to rework 077 anyway if we don't
>>> only want to make it pass again, but to cover all relevant paths, too.
>>> We got a new code path and it's unlikely that the existing tests covered
>>> both the old code path and the new one.
>> So you would postpone this patch until 077 is reworked?
>> I found this one a nice improvement and 077 might take some time.
> The problem with "we'll rework the tests later" is always that it
> doesn't happen if the patches for the functional parts and a workaround
> for the test case are merged.
>
> I don't think that making 077 cover both cases should be hard or take
> much time, it just needs to be done. If all the time for writing emails
> in this thread had been used to work on the test case, it would already
> be done.
Understood. If you can give a hint how to get the value of the align
parameter into the test script I can try. Otherwise the test will fail
also if any block driver has an align value that is not equal to 512.
Peter
next prev parent reply other threads:[~2016-05-30 9:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-24 14:30 [Qemu-devel] [PATCH V2] block/io: optimize bdrv_co_pwritev for small requests Peter Lieven
2016-05-24 15:07 ` Kevin Wolf
2016-05-26 6:50 ` Fam Zheng
2016-05-26 7:10 ` Fam Zheng
2016-05-26 7:55 ` Paolo Bonzini
2016-05-26 8:30 ` Fam Zheng
2016-05-26 9:20 ` Paolo Bonzini
2016-05-27 0:36 ` Fam Zheng
2016-05-27 8:55 ` Kevin Wolf
2016-05-30 6:25 ` Peter Lieven
2016-05-30 8:24 ` Kevin Wolf
2016-05-30 9:30 ` Peter Lieven
2016-05-30 9:47 ` Kevin Wolf
2016-05-30 9:53 ` Peter Lieven [this message]
2016-05-30 10:06 ` Kevin Wolf
2016-05-30 10:10 ` Peter Lieven
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=574C0D92.5090302@kamp.de \
--to=pl@kamp.de \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@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).