All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] softmmu/physmem.c: Fix typo in comment
@ 2021-10-15  9:29 Greg Kurz
  2021-10-15  9:30 ` David Hildenbrand
  2021-10-19  7:47 ` Laurent Vivier
  0 siblings, 2 replies; 3+ messages in thread
From: Greg Kurz @ 2021-10-15  9:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Paolo Bonzini, Philippe Mathieu-Daudé,
	Peter Xu, David Hildenbrand

Fix the comment to match what the code is doing, as explained in
the changelog of commit 86cf9e154632cb28d749db0ea47946fba8cf3f09
that introduced the change:

    Commit 9458a9a1df1a4c719e24512394d548c1fc7abd22 added synchronization
    of vCPU and migration operations through calling run_on_cpu operation.
    However, in replay mode this synchronization is unneeded, because
    I/O and vCPU threads are already synchronized.
    This patch disables such synchronization for record/replay mode.


Signed-off-by: Greg Kurz <groug@kaod.org>
---
 softmmu/physmem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/softmmu/physmem.c b/softmmu/physmem.c
index f67ad2998121..555c907f6743 100644
--- a/softmmu/physmem.c
+++ b/softmmu/physmem.c
@@ -2633,7 +2633,7 @@ static void tcg_log_global_after_sync(MemoryListener *listener)
          * In record/replay mode this causes a deadlock, because
          * run_on_cpu waits for rr mutex. Therefore no races are possible
          * in this case and no need for making run_on_cpu when
-         * record/replay is not enabled.
+         * record/replay is enabled.
          */
         cpuas = container_of(listener, CPUAddressSpace, tcg_as_listener);
         run_on_cpu(cpuas->cpu, do_nothing, RUN_ON_CPU_NULL);




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] softmmu/physmem.c: Fix typo in comment
  2021-10-15  9:29 [PATCH] softmmu/physmem.c: Fix typo in comment Greg Kurz
@ 2021-10-15  9:30 ` David Hildenbrand
  2021-10-19  7:47 ` Laurent Vivier
  1 sibling, 0 replies; 3+ messages in thread
From: David Hildenbrand @ 2021-10-15  9:30 UTC (permalink / raw)
  To: Greg Kurz, qemu-devel
  Cc: qemu-trivial, Paolo Bonzini, Philippe Mathieu-Daudé, Peter Xu

On 15.10.21 11:29, Greg Kurz wrote:
> Fix the comment to match what the code is doing, as explained in
> the changelog of commit 86cf9e154632cb28d749db0ea47946fba8cf3f09
> that introduced the change:
> 
>     Commit 9458a9a1df1a4c719e24512394d548c1fc7abd22 added synchronization
>     of vCPU and migration operations through calling run_on_cpu operation.
>     However, in replay mode this synchronization is unneeded, because
>     I/O and vCPU threads are already synchronized.
>     This patch disables such synchronization for record/replay mode.
> 
> 
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
>  softmmu/physmem.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/softmmu/physmem.c b/softmmu/physmem.c
> index f67ad2998121..555c907f6743 100644
> --- a/softmmu/physmem.c
> +++ b/softmmu/physmem.c
> @@ -2633,7 +2633,7 @@ static void tcg_log_global_after_sync(MemoryListener *listener)
>           * In record/replay mode this causes a deadlock, because
>           * run_on_cpu waits for rr mutex. Therefore no races are possible
>           * in this case and no need for making run_on_cpu when
> -         * record/replay is not enabled.
> +         * record/replay is enabled.
>           */
>          cpuas = container_of(listener, CPUAddressSpace, tcg_as_listener);
>          run_on_cpu(cpuas->cpu, do_nothing, RUN_ON_CPU_NULL);
> 
> 

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Thanks,

David / dhildenb



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] softmmu/physmem.c: Fix typo in comment
  2021-10-15  9:29 [PATCH] softmmu/physmem.c: Fix typo in comment Greg Kurz
  2021-10-15  9:30 ` David Hildenbrand
@ 2021-10-19  7:47 ` Laurent Vivier
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2021-10-19  7:47 UTC (permalink / raw)
  To: Greg Kurz, qemu-devel
  Cc: qemu-trivial, Paolo Bonzini, Philippe Mathieu-Daudé,
	Peter Xu, David Hildenbrand

Le 15/10/2021 à 11:29, Greg Kurz a écrit :
> Fix the comment to match what the code is doing, as explained in
> the changelog of commit 86cf9e154632cb28d749db0ea47946fba8cf3f09
> that introduced the change:
> 
>     Commit 9458a9a1df1a4c719e24512394d548c1fc7abd22 added synchronization
>     of vCPU and migration operations through calling run_on_cpu operation.
>     However, in replay mode this synchronization is unneeded, because
>     I/O and vCPU threads are already synchronized.
>     This patch disables such synchronization for record/replay mode.
> 
> 
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
>  softmmu/physmem.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/softmmu/physmem.c b/softmmu/physmem.c
> index f67ad2998121..555c907f6743 100644
> --- a/softmmu/physmem.c
> +++ b/softmmu/physmem.c
> @@ -2633,7 +2633,7 @@ static void tcg_log_global_after_sync(MemoryListener *listener)
>           * In record/replay mode this causes a deadlock, because
>           * run_on_cpu waits for rr mutex. Therefore no races are possible
>           * in this case and no need for making run_on_cpu when
> -         * record/replay is not enabled.
> +         * record/replay is enabled.
>           */
>          cpuas = container_of(listener, CPUAddressSpace, tcg_as_listener);
>          run_on_cpu(cpuas->cpu, do_nothing, RUN_ON_CPU_NULL);
> 
> 
> 
Applied to my trivial-patches branch.

Thanks,
Laurent




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-19  7:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-15  9:29 [PATCH] softmmu/physmem.c: Fix typo in comment Greg Kurz
2021-10-15  9:30 ` David Hildenbrand
2021-10-19  7:47 ` Laurent Vivier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.