[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/7] coroutine-ucontext: use __thread
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 1/7] coroutine-ucontext: use __thread |
Date: |
Fri, 28 Nov 2014 14:28:53 +0000 |
On 28 November 2014 at 14:12, Paolo Bonzini <address@hidden> wrote:
> +/* This function is marked noinline to prevent GCC from inlining it
> + * into coroutine_trampoline(). If we allow it to do that then it
> + * hoists the code to get the address of the TLS variable "current"
> + * out of the while() loop. This is an invalid transformation because
> + * the SwitchToFiber() call may be called when running thread A but
> + * return in thread B, and so we might be in a different thread
> + * context each time round the loop.
> + */
> CoroutineAction qemu_coroutine_switch(Coroutine *from_, Coroutine *to_,
> CoroutineAction action)
??? You've added the comment but the function is not marked
"noinline" at all...
-- PMM
- [Qemu-devel] [PATCH 0/7] coroutine: optimizations, Paolo Bonzini, 2014/11/28
- [Qemu-devel] [PATCH 1/7] coroutine-ucontext: use __thread, Paolo Bonzini, 2014/11/28
- [Qemu-devel] [PATCH 2/7] qemu-thread: add per-thread atexit functions, Paolo Bonzini, 2014/11/28
- [Qemu-devel] [PATCH 3/7] test-coroutine: avoid overflow on 32-bit systems, Paolo Bonzini, 2014/11/28
- [Qemu-devel] [PATCH 4/7] QSLIST: add lock-free operations, Paolo Bonzini, 2014/11/28
- [Qemu-devel] [PATCH 5/7] coroutine: rewrite pool to avoid mutex, Paolo Bonzini, 2014/11/28