[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL for-2.5 2/4] block: Don't wait serialising for no
From: |
Christian Borntraeger |
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:03:49 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
On 12/08/2015 02:58 PM, Christian Borntraeger wrote:
[...9
>>>
>>> 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.
>
> Christian
Kevin,
I am wondering. gcc saves/restores f8 in the generated code for the
coroutine and setjmp/longjmp also save/restore the fprs. why do
coroutines do not save the FPU state (which code does a light weight
switching)
Christian
- [Qemu-devel] [PULL for-2.5 2/4] block: Don't wait serialising for non-COR read requests, (continued)
- [Qemu-devel] [PULL for-2.5 2/4] block: Don't wait serialising for non-COR read requests, Stefan Hajnoczi, 2015/12/03
- Re: [Qemu-devel] [PULL for-2.5 2/4] block: Don't wait serialising for non-COR read requests, Cornelia Huck, 2015/12/07
- Re: [Qemu-devel] [PULL for-2.5 2/4] block: Don't wait serialising for non-COR read requests, Cornelia Huck, 2015/12/07
- Re: [Qemu-devel] [PULL for-2.5 2/4] block: Don't wait serialising for non-COR read requests, Fam Zheng, 2015/12/07
- Re: [Qemu-devel] [PULL for-2.5 2/4] block: Don't wait serialising for non-COR read requests, Kevin Wolf, 2015/12/08
- Re: [Qemu-devel] [PULL for-2.5 2/4] block: Don't wait serialising for non-COR read requests, Cornelia Huck, 2015/12/08
- Re: [Qemu-devel] [PULL for-2.5 2/4] block: Don't wait serialising for non-COR read requests, Christian Borntraeger, 2015/12/08
- Re: [Qemu-devel] [PULL for-2.5 2/4] block: Don't wait serialising for non-COR read requests, Christian Borntraeger, 2015/12/08
- Re: [Qemu-devel] [PULL for-2.5 2/4] block: Don't wait serialising for non-COR read requests, Kevin Wolf, 2015/12/08
- Re: [Qemu-devel] [PULL for-2.5 2/4] block: Don't wait serialising for non-COR read requests, Christian Borntraeger, 2015/12/08
- Re: [Qemu-devel] [PULL for-2.5 2/4] block: Don't wait serialising for non-COR read requests,
Christian Borntraeger <=
- Re: [Qemu-devel] [PULL for-2.5 2/4] block: Don't wait serialising for non-COR read requests, Kevin Wolf, 2015/12/08
- Re: [Qemu-devel] [PULL for-2.5 2/4] block: Don't wait serialising for non-COR read requests, Christian Borntraeger, 2015/12/08
- Re: [Qemu-devel] [PULL for-2.5 2/4] block: Don't wait serialising for non-COR read requests, Cornelia Huck, 2015/12/08
- Re: [Qemu-devel] [PULL for-2.5 2/4] block: Don't wait serialising for non-COR read requests, Peter Maydell, 2015/12/08
[Qemu-devel] [PULL for-2.5 3/4] iotests: Add "add_drive_raw" method, Stefan Hajnoczi, 2015/12/03
[Qemu-devel] [PULL for-2.5 4/4] iotests: Add regresion test case for write notifier assertion failure, Stefan Hajnoczi, 2015/12/03
Re: [Qemu-devel] [PULL for-2.5 0/4] Block patches, Peter Maydell, 2015/12/03