Skip to contentSkip to conversation

Revert "tcg/user: do not set exit_request gratuitously"

PATCH Applied Paolo Bonzini 3 participants 5 messages Feb 2 – Feb 10

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "tcg/user: do not set exit_request gratuitously"

This reverts commit b422a7bff64eaf55b8250225533ca1df42c3777e.

The reporter says "The commit breaks go; if you run go build in a loop, it eventually hangs uninterruptible (except -9) with a couple of zombie children left over".

---
 accel/tcg/cpu-exec.c | 2 --
 1 file changed, 2 deletions(-)
accel/tcg/cpu-exec.c +0 -2
index 7c20d9db122..ad94f96b252 100644
@@ -751,7 +751,6 @@ static inline bool cpu_handle_exception(CPUState *cpu, int *ret)
 
 void tcg_kick_vcpu_thread(CPUState *cpu)
 {
-#ifndef CONFIG_USER_ONLY
     /*
      * Ensure cpu_exec will see the reason why the exit request was set.
      * FIXME: this is not always needed.  Other accelerators instead
@@ -759,7 +758,6 @@ void tcg_kick_vcpu_thread(CPUState *cpu)
      * CPU thread; see kvm_arch_pre_run() for example.
      */
     qatomic_store_release(&cpu->exit_request, true);
-#endif
 
     /* Ensure cpu_exec will see the exit request after TCG has exited.  */
     qatomic_store_release(&cpu->neg.icount_decr.u16.high, -1);
Signature · 1 line
2.52.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 25 lines · Paolo Bonzini

This reverts commit b422a7bff64eaf55b8250225533ca1df42c3777e.

The reporter says "The commit breaks go; if you run go build in a loop, it eventually hangs uninterruptible (except -9) with a couple of zombie children left over".

---
  accel/tcg/cpu-exec.c | 2 --
  1 file changed, 2 deletions(-)
accel/tcg/cpu-exec.c +0 -1
index 7c20d9db122..ad94f96b252 100644
@@ -751,7 +751,6 @@ static inline bool cpu_handle_exception(CPUState *cpu, int *ret)
 
  void tcg_kick_vcpu_thread(CPUState *cpu)
  {
-#ifndef CONFIG_USER_ONLY
      /*
       * Ensure cpu_exec will see the reason why the exit request was set.
       * FIXME: this is not always needed.  Other accelerators instead

accel/tcg/cpu-exec.c void tcg_kick_vcpu_thread(CPUState *cpu) · line 763

Quoted 7 lines
accel/tcg/cpu-exec.c +0 -1
@@ -759,7 +758,6 @@ void tcg_kick_vcpu_thread(CPUState *cpu)
       * CPU thread; see kvm_arch_pre_run() for example.
       */
      qatomic_store_release(&cpu->exit_request, true);
-#endif
 
      /* Ensure cpu_exec will see the exit request after TCG has exited.  */
      qatomic_store_release(&cpu->neg.icount_decr.u16.high, -1);

r~

#2 lore raw
Quoted 25 lines · Richard Henderson
Quoted 24 lines · Paolo Bonzini

This reverts commit b422a7bff64eaf55b8250225533ca1df42c3777e.

The reporter says "The commit breaks go; if you run go build in a loop, it eventually hangs uninterruptible (except -9) with a couple of zombie children left over".

---
  accel/tcg/cpu-exec.c | 2 --

  1 file changed, 2 deletions(-)
accel/tcg/cpu-exec.c +0 -1
index 7c20d9db122..ad94f96b252 100644
@@ -751,7 +751,6 @@ static inline bool cpu_handle_exception(CPUState *cpu, int *ret)
   void tcg_kick_vcpu_thread(CPUState *cpu)
   {
-#ifndef CONFIG_USER_ONLY
       /*
        * Ensure cpu_exec will see the reason why the exit request was set.
        * FIXME: this is not always needed.  Other accelerators instead
@@ -759,7 +758,6 @@ void tcg_kick_vcpu_thread(CPUState *cpu)
Quoted 8 lines

accel/tcg/cpu-exec.c void tcg_kick_vcpu_thread(CPUState *cpu) · line 763

Quoted 6 lines
accel/tcg/cpu-exec.c +0 -1
        * CPU thread; see kvm_arch_pre_run() for example.
        */
       qatomic_store_release(&cpu->exit_request, true);
-#endif
       /* Ensure cpu_exec will see the exit request after TCG has exited.  */
       qatomic_store_release(&cpu->neg.icount_decr.u16.high, -1);

Queued, thanks.

r~

#3 lore raw
In reply to Paolo Bonzini
Quoted 8 lines · Paolo Bonzini

This reverts commit b422a7bff64eaf55b8250225533ca1df42c3777e.

The reporter says "The commit breaks go; if you run go build in a loop, it eventually hangs uninterruptible (except -9) with a couple of zombie children left over".

I'm picking this one up for stable-10.2.x
(where the original commit is).

Please let me know if I shouldn't.

Thanks,

/mjt

#4 lore raw
Quoted 5 lines · Michael Tokarev

On 2/2/26 12:17, Paolo Bonzini wrote:
I'm picking this one up for stable-10.2.x
(where the original commit is).

Please let me know if I shouldn't.

Yes, that's good.

Paolo