From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>,
Peter Maydell <peter.maydell@linaro.org>,
Fam Zheng <famz@redhat.com>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PULL for-2.5 2/4] block: Don't wait serialising for non-COR read requests
Date: Tue, 8 Dec 2015 15:24:29 +0100 [thread overview]
Message-ID: <5666E81D.7070507@de.ibm.com> (raw)
In-Reply-To: <20151208141021.GF5071@noname.str.redhat.com>
On 12/08/2015 03:10 PM, Kevin Wolf wrote:
[...]
>>>> Not a compiler bug. gcc uses a floating point register 8 to spill
>>>> the pointer of blk (which is call saved) submit_request will later
>>>> on call qemu_coroutine_enter and after returning from
>>>> qemu_coroutine_enter, the fpr8 contains junk. Not sure yet, what happened.
>>>
>>> Coroutines don't save the FPU state, so you're not supposed to use
>>> floating point operations inside coroutines. That the compiler spills
>>> some integer value into a floating point register is a bit nasty...
>>
>> Just checked. bdrv_aligned_preadv does also use fprs (also for filling
>> and spilling). Some versions of gcc seem to like that as the LDGR and LGDR
>> instructions are pretty cheap and move the content from/to fprs in a bitwise
>> fashion. So this coroutine DOES trash floating point registers.
>>
>> Without the patch gcc seems to be fine with the 16 gprs and does not
>> spilling/filling from/to fprs in bdrv_aligned_preadv.
>
> Actually, on closer look it seems that the reason why there is no code
> for saving the floating point registers in setjmp() on x86 is that they
> are caller-save registers anyway, so it doesn't have to. Otherwise the
> internet seems to be of the opinion that longjmp() must indeed restore
> floating point registers.
>
> So this might be a libc bug on s390 then.
Fixed with
https://sourceware.org/ml/libc-alpha/2013-01/msg00853.html
Christian
next prev parent reply other threads:[~2015-12-08 14:24 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-03 4:59 [Qemu-devel] [PULL for-2.5 0/4] Block patches Stefan Hajnoczi
2015-12-03 4:59 ` [Qemu-devel] [PULL for-2.5 1/4] iothread: include id in thread name Stefan Hajnoczi
2015-12-07 9:58 ` Cornelia Huck
2015-12-03 5:00 ` [Qemu-devel] [PULL for-2.5 2/4] block: Don't wait serialising for non-COR read requests Stefan Hajnoczi
2015-12-07 10:02 ` Cornelia Huck
2015-12-07 16:42 ` Cornelia Huck
2015-12-08 2:08 ` Fam Zheng
2015-12-08 9:59 ` Kevin Wolf
2015-12-08 12:00 ` Cornelia Huck
2015-12-08 12:30 ` Christian Borntraeger
2015-12-08 13:28 ` Christian Borntraeger
2015-12-08 13:45 ` Kevin Wolf
2015-12-08 13:58 ` Christian Borntraeger
2015-12-08 14:03 ` Christian Borntraeger
2015-12-08 14:10 ` Kevin Wolf
2015-12-08 14:24 ` Christian Borntraeger [this message]
2015-12-08 14:38 ` Cornelia Huck
2015-12-08 14:15 ` Peter Maydell
2015-12-03 5:00 ` [Qemu-devel] [PULL for-2.5 3/4] iotests: Add "add_drive_raw" method Stefan Hajnoczi
2015-12-03 5:00 ` [Qemu-devel] [PULL for-2.5 4/4] iotests: Add regresion test case for write notifier assertion failure Stefan Hajnoczi
2015-12-03 11:53 ` [Qemu-devel] [PULL for-2.5 0/4] Block patches Peter Maydell
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=5666E81D.7070507@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=peter.maydell@linaro.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).