[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 05/10] tcg: Prepare TB invalidation for lockless
From: |
Sergey Fedorov |
Subject: |
Re: [Qemu-devel] [PATCH 05/10] tcg: Prepare TB invalidation for lockless TB lookup |
Date: |
Tue, 19 Jul 2016 22:56:49 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 |
On 19/07/16 11:32, Paolo Bonzini wrote:
>
It looks much better now :)
> When invalidating a translation block, set an invalid flag into the
> TranslationBlock structure first. It is also necessary to check whether
> the target TB is still valid after acquiring 'tb_lock' but before calling
> tb_add_jump() since TB lookup is to be performed out of 'tb_lock' in
> future. Note that we don't have to check 'last_tb'; an already invalidated
> TB will not be executed anyway and it is thus safe to patch it.
>
> Suggested-by: Sergey Fedorov <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> cpu-exec.c | 5 +++--
> include/exec/exec-all.h | 2 ++
> translate-all.c | 3 +++
> 3 files changed, 8 insertions(+), 2 deletions(-)
(snip)
> diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
> index acda7b6..bc0bcc5 100644
> --- a/include/exec/exec-all.h
> +++ b/include/exec/exec-all.h
> @@ -213,6 +213,8 @@ struct TranslationBlock {
> #define CF_USE_ICOUNT 0x20000
> #define CF_IGNORE_ICOUNT 0x40000 /* Do not generate icount code */
>
> + uint16_t invalid;
Why not "int"?
> +
> void *tc_ptr; /* pointer to the translated code */
> uint8_t *tc_search; /* pointer to search data */
> /* original tb when cflags has CF_NOCACHE */
>
Thanks,
Sergey
- [Qemu-devel] [PATCH v5 00/10] Reduce lock contention on TCG hot-path, Paolo Bonzini, 2016/07/19
- [Qemu-devel] [PATCH 02/10] tcg: Pass last_tb by value to tb_find_fast(), Paolo Bonzini, 2016/07/19
- [Qemu-devel] [PATCH 01/10] util/qht: Document memory ordering assumptions, Paolo Bonzini, 2016/07/19
- [Qemu-devel] [PATCH 05/10] tcg: Prepare TB invalidation for lockless TB lookup, Paolo Bonzini, 2016/07/19
- Re: [Qemu-devel] [PATCH 05/10] tcg: Prepare TB invalidation for lockless TB lookup,
Sergey Fedorov <=
- Re: [Qemu-devel] [PATCH 05/10] tcg: Prepare TB invalidation for lockless TB lookup, Paolo Bonzini, 2016/07/19
- Re: [Qemu-devel] [PATCH 05/10] tcg: Prepare TB invalidation for lockless TB lookup, Sergey Fedorov, 2016/07/21
- Re: [Qemu-devel] [PATCH 05/10] tcg: Prepare TB invalidation for lockless TB lookup, Paolo Bonzini, 2016/07/21
- Re: [Qemu-devel] [PATCH 05/10] tcg: Prepare TB invalidation for lockless TB lookup, Paolo Bonzini, 2016/07/21
- Re: [Qemu-devel] [PATCH 05/10] tcg: Prepare TB invalidation for lockless TB lookup, Sergey Fedorov, 2016/07/21
[Qemu-devel] [PATCH 03/10] tcg: Prepare safe tb_jmp_cache lookup out of tb_lock, Paolo Bonzini, 2016/07/19
[Qemu-devel] [PATCH 04/10] tcg: Prepare safe access to tb_flushed out of tb_lock, Paolo Bonzini, 2016/07/19
[Qemu-devel] [PATCH 06/10] tcg: set up tb->page_addr before insertion, Paolo Bonzini, 2016/07/19
[Qemu-devel] [PATCH 08/10] tcg: Avoid bouncing tb_lock between tb_gen_code() and tb_add_jump(), Paolo Bonzini, 2016/07/19
[Qemu-devel] [PATCH 10/10] tcg: rename tb_find_physical(), Paolo Bonzini, 2016/07/19