All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 1441781] [NEW] qemuProcessSetEmulatorAffinity() called before emulator process actually running
@ 2015-04-08 18:09 Chris Friesen
  2015-04-08 18:16 ` [Qemu-devel] [Bug 1441781] " Chris Friesen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Friesen @ 2015-04-08 18:09 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

In qemuProcessStart() the code looks like this:

    VIR_DEBUG("Setting cgroup for emulator (if required)");
    if (qemuSetupCgroupForEmulator(vm) < 0)
        goto cleanup;

    VIR_DEBUG("Setting affinity of emulator threads");
    if (qemuProcessSetEmulatorAffinity(vm) < 0)
        goto cleanup;

    VIR_DEBUG("Waiting for monitor to show up");
    if (qemuProcessWaitForMonitor(driver, vm, asyncJob, priv->qemuCaps, pos) < 0)
        goto cleanup;


When running on a 24-CPU host and using vCPU and emulator pinning I've seen cases where the specified emulator pinning isn't applied as expected.

The issue appears to be due to libvirt racing with qemu.  Moving the
qemuProcessSetEmulatorAffinity() call to after
qemuProcessWaitForMonitor() returns seems to fix the problem.

Also, I suspect that qemuSetupCgroupForEmulator() should probably be
moved as well.

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1441781

Title:
  qemuProcessSetEmulatorAffinity() called before emulator process
  actually running

Status in QEMU:
  New

Bug description:
  In qemuProcessStart() the code looks like this:

      VIR_DEBUG("Setting cgroup for emulator (if required)");
      if (qemuSetupCgroupForEmulator(vm) < 0)
          goto cleanup;

      VIR_DEBUG("Setting affinity of emulator threads");
      if (qemuProcessSetEmulatorAffinity(vm) < 0)
          goto cleanup;

      VIR_DEBUG("Waiting for monitor to show up");
      if (qemuProcessWaitForMonitor(driver, vm, asyncJob, priv->qemuCaps, pos) < 0)
          goto cleanup;

  
  When running on a 24-CPU host and using vCPU and emulator pinning I've seen cases where the specified emulator pinning isn't applied as expected.

  The issue appears to be due to libvirt racing with qemu.  Moving the
  qemuProcessSetEmulatorAffinity() call to after
  qemuProcessWaitForMonitor() returns seems to fix the problem.

  Also, I suspect that qemuSetupCgroupForEmulator() should probably be
  moved as well.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1441781/+subscriptions

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

* [Qemu-devel] [Bug 1441781] Re: qemuProcessSetEmulatorAffinity() called before emulator process actually running
  2015-04-08 18:09 [Qemu-devel] [Bug 1441781] [NEW] qemuProcessSetEmulatorAffinity() called before emulator process actually running Chris Friesen
@ 2015-04-08 18:16 ` Chris Friesen
  2015-04-08 18:26 ` [Qemu-devel] [Bug 1441781] Re: qemuProcessSetEmulatorAffinity() not behaving as expected Chris Friesen
  2015-04-10 10:13 ` Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Chris Friesen @ 2015-04-08 18:16 UTC (permalink / raw)
  To: qemu-devel

** Description changed:

- In qemuProcessStart() the code looks like this:
+ When running on a 24-CPU host and using vCPU and emulator pinning I've
+ seen cases where the specified emulator pinning isn't applied as
+ expected.
  
-     VIR_DEBUG("Setting cgroup for emulator (if required)");
-     if (qemuSetupCgroupForEmulator(vm) < 0)
-         goto cleanup;
- 
-     VIR_DEBUG("Setting affinity of emulator threads");
-     if (qemuProcessSetEmulatorAffinity(vm) < 0)
-         goto cleanup;
- 
-     VIR_DEBUG("Waiting for monitor to show up");
-     if (qemuProcessWaitForMonitor(driver, vm, asyncJob, priv->qemuCaps, pos) < 0)
-         goto cleanup;
- 
- 
- When running on a 24-CPU host and using vCPU and emulator pinning I've seen cases where the specified emulator pinning isn't applied as expected.
- 
- The issue appears to be due to libvirt racing with qemu.  Moving the
- qemuProcessSetEmulatorAffinity() call to after
- qemuProcessWaitForMonitor() returns seems to fix the problem.
- 
- Also, I suspect that qemuSetupCgroupForEmulator() should probably be
- moved as well.
+ It appears the bug was introduced by 411cea6 which moved both
+ qemuSetupCgroupForEmulator() and qemuProcessSetEmulatorAffinity() up
+ before the call to qemuProcessWaitForMonitor().  Reverting this commit
+ makes the problem go away.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1441781

Title:
  qemuProcessSetEmulatorAffinity() called before emulator process
  actually running

Status in QEMU:
  New

Bug description:
  When running on a 24-CPU host and using vCPU and emulator pinning I've
  seen cases where the specified emulator pinning isn't applied as
  expected.

  It appears the bug was introduced by 411cea6 which moved both
  qemuSetupCgroupForEmulator() and qemuProcessSetEmulatorAffinity() up
  before the call to qemuProcessWaitForMonitor().  Reverting this commit
  makes the problem go away.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1441781/+subscriptions

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

* [Qemu-devel] [Bug 1441781] Re: qemuProcessSetEmulatorAffinity() not behaving as expected
  2015-04-08 18:09 [Qemu-devel] [Bug 1441781] [NEW] qemuProcessSetEmulatorAffinity() called before emulator process actually running Chris Friesen
  2015-04-08 18:16 ` [Qemu-devel] [Bug 1441781] " Chris Friesen
@ 2015-04-08 18:26 ` Chris Friesen
  2015-04-10 10:13 ` Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Chris Friesen @ 2015-04-08 18:26 UTC (permalink / raw)
  To: qemu-devel

** Summary changed:

- qemuProcessSetEmulatorAffinity() called before emulator process actually running
+ qemuProcessSetEmulatorAffinity() not behaving as expected

** Description changed:

  When running on a 24-CPU host and using vCPU and emulator pinning I've
  seen cases where the specified emulator pinning isn't applied as
  expected.
  
- It appears the bug was introduced by 411cea6 which moved both
+ It appears the bug was introduced/uncovered by 411cea6 which moved both
  qemuSetupCgroupForEmulator() and qemuProcessSetEmulatorAffinity() up
  before the call to qemuProcessWaitForMonitor().  Reverting this commit
  makes the problem go away.
+ 
+ It's not obvious why this makes a difference, since the pid had to have
+ been up and running already.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1441781

Title:
  qemuProcessSetEmulatorAffinity() not behaving as expected

Status in QEMU:
  New

Bug description:
  When running on a 24-CPU host and using vCPU and emulator pinning I've
  seen cases where the specified emulator pinning isn't applied as
  expected.

  It appears the bug was introduced/uncovered by 411cea6 which moved
  both qemuSetupCgroupForEmulator() and qemuProcessSetEmulatorAffinity()
  up before the call to qemuProcessWaitForMonitor().  Reverting this
  commit makes the problem go away.

  It's not obvious why this makes a difference, since the pid had to
  have been up and running already.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1441781/+subscriptions

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

* [Qemu-devel] [Bug 1441781] Re: qemuProcessSetEmulatorAffinity() not behaving as expected
  2015-04-08 18:09 [Qemu-devel] [Bug 1441781] [NEW] qemuProcessSetEmulatorAffinity() called before emulator process actually running Chris Friesen
  2015-04-08 18:16 ` [Qemu-devel] [Bug 1441781] " Chris Friesen
  2015-04-08 18:26 ` [Qemu-devel] [Bug 1441781] Re: qemuProcessSetEmulatorAffinity() not behaving as expected Chris Friesen
@ 2015-04-10 10:13 ` Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2015-04-10 10:13 UTC (permalink / raw)
  To: qemu-devel

** Also affects: libvirt
   Importance: Undecided
       Status: New

** Changed in: qemu
       Status: New => Invalid

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1441781

Title:
  qemuProcessSetEmulatorAffinity() not behaving as expected

Status in libvirt virtualization API:
  New
Status in QEMU:
  Invalid

Bug description:
  When running on a 24-CPU host and using vCPU and emulator pinning I've
  seen cases where the specified emulator pinning isn't applied as
  expected.

  It appears the bug was introduced/uncovered by 411cea6 which moved
  both qemuSetupCgroupForEmulator() and qemuProcessSetEmulatorAffinity()
  up before the call to qemuProcessWaitForMonitor().  Reverting this
  commit makes the problem go away.

  It's not obvious why this makes a difference, since the pid had to
  have been up and running already.

To manage notifications about this bug go to:
https://bugs.launchpad.net/libvirt/+bug/1441781/+subscriptions

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

end of thread, other threads:[~2015-04-10 10:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-08 18:09 [Qemu-devel] [Bug 1441781] [NEW] qemuProcessSetEmulatorAffinity() called before emulator process actually running Chris Friesen
2015-04-08 18:16 ` [Qemu-devel] [Bug 1441781] " Chris Friesen
2015-04-08 18:26 ` [Qemu-devel] [Bug 1441781] Re: qemuProcessSetEmulatorAffinity() not behaving as expected Chris Friesen
2015-04-10 10:13 ` Stefan Hajnoczi

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.