qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [Bug 1441781] [NEW] qemuProcessSetEmulatorAffinity() called


From: Chris Friesen
Subject: [Qemu-devel] [Bug 1441781] [NEW] qemuProcessSetEmulatorAffinity() called before emulator process actually running
Date: Wed, 08 Apr 2015 18:09:31 -0000

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]