qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, serge.fdrv@gmail.com, sergey.fedorov@linaro.org
Subject: Re: [Qemu-devel] [PATCH 02/10] tcg: Pass last_tb by value to tb_find_fast()
Date: Thu, 08 Sep 2016 13:44:10 +0100	[thread overview]
Message-ID: <87wpimy31h.fsf@linaro.org> (raw)
In-Reply-To: <1468917141-8155-3-git-send-email-pbonzini@redhat.com>


Paolo Bonzini <pbonzini@redhat.com> writes:

> From: Sergey Fedorov <serge.fdrv@gmail.com>
>
> This is a small clean up. tb_find_fast() is a final consumer of this
> variable so no need to pass it by reference. 'last_tb' is always updated
> by subsequent cpu_loop_exec_tb() in cpu_exec().
>
<snip>
> @@ -621,7 +620,7 @@ int cpu_exec(CPUState *cpu)
>              cpu->tb_flushed = false; /* reset before first TB lookup */
>              for(;;) {
>                  cpu_handle_interrupt(cpu, &last_tb);
> -                tb = tb_find_fast(cpu, &last_tb, tb_exit);
> +                tb = tb_find_fast(cpu, last_tb, tb_exit);

Maybe a comment here for those that missed the subtly in the commit
message?

                   /* cpu_loop_exec_tb updates a to a new last_tb */

>                  cpu_loop_exec_tb(cpu, tb, &last_tb, &tb_exit, &sc);

You could even make it explicit and change cpu_loop_exec_tb to return
last_tb instead of passing by reference. Then it would be even clearer
when reading the code.

>                  /* Try to align the host and virtual clocks
>                     if the guest is in advance */



--
Alex Bennée

  reply	other threads:[~2016-09-08 12:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19  8:32 [Qemu-devel] [PATCH v5 00/10] Reduce lock contention on TCG hot-path Paolo Bonzini
2016-07-19  8:32 ` [Qemu-devel] [PATCH 01/10] util/qht: Document memory ordering assumptions Paolo Bonzini
2016-07-19  8:32 ` [Qemu-devel] [PATCH 02/10] tcg: Pass last_tb by value to tb_find_fast() Paolo Bonzini
2016-09-08 12:44   ` Alex Bennée [this message]
2016-09-08 13:28     ` Paolo Bonzini
2016-07-19  8:32 ` [Qemu-devel] [PATCH 03/10] tcg: Prepare safe tb_jmp_cache lookup out of tb_lock Paolo Bonzini
2016-07-19  8:32 ` [Qemu-devel] [PATCH 04/10] tcg: Prepare safe access to tb_flushed " Paolo Bonzini
2016-07-19  8:32 ` [Qemu-devel] [PATCH 05/10] tcg: Prepare TB invalidation for lockless TB lookup Paolo Bonzini
2016-07-19 19:56   ` Sergey Fedorov
2016-07-19 22:27     ` Paolo Bonzini
2016-07-21  8:36       ` Sergey Fedorov
2016-07-21  9:04         ` Paolo Bonzini
2016-07-21 11:25         ` Paolo Bonzini
2016-07-21 17:42           ` Sergey Fedorov
2016-07-19  8:32 ` [Qemu-devel] [PATCH 06/10] tcg: set up tb->page_addr before insertion Paolo Bonzini
2016-07-19  8:32 ` [Qemu-devel] [PATCH 07/10] tcg: cpu-exec: remove tb_lock from the hot-path Paolo Bonzini
2016-07-19  8:32 ` [Qemu-devel] [PATCH 08/10] tcg: Avoid bouncing tb_lock between tb_gen_code() and tb_add_jump() Paolo Bonzini
2016-07-19  8:32 ` [Qemu-devel] [PATCH 09/10] tcg: Merge tb_find_slow() and tb_find_fast() Paolo Bonzini
2016-07-19  8:32 ` [Qemu-devel] [PATCH 10/10] tcg: rename tb_find_physical() Paolo Bonzini
2016-09-08 12:39   ` Alex Bennée

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=87wpimy31h.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=serge.fdrv@gmail.com \
    --cc=sergey.fedorov@linaro.org \
    /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).