[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-stable] [Qemu-devel] [PATCH 1/2] win32: do not set CPU affinit
From: |
Roy Tam |
Subject: |
Re: [Qemu-stable] [Qemu-devel] [PATCH 1/2] win32: do not set CPU affinity |
Date: |
Thu, 21 Feb 2013 08:35:07 +0800 |
2013/2/20 Paolo Bonzini <address@hidden>:
> QEMU system emulation has been thread-safe for a long time, and
> setting the CPU affinity is hurting performance badly. Remove
> the bogus code.
>
> Jacob Kroon reports that the time to boot his VxWorks image goes from
> "3 minutes passed and I still haven't made it that far" to ~140s.
>
Yes it does work better for fdostest.img, but when I tried to boot
ttylinux-i686-14.0.iso, qemu freezes after showing "loading vmlinuz
..."
> Cc: address@hidden
> Tested-by: Jacob Kroon <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> Jacob, this is "patch 3" you tested.
>
> os-win32.c | 18 -------------------
> 1 file changed, 18 deletions(-)
>
> diff --git a/os-win32.c b/os-win32.c
> index 9673a81..3d43604 100644
> --- a/os-win32.c
> +++ b/os-win32.c
> @@ -69,25 +69,7 @@ static BOOL WINAPI qemu_ctrl_handler(DWORD type)
>
> void os_setup_early_signal_handling(void)
> {
> - /* Note: cpu_interrupt() is currently not SMP safe, so we force
> - QEMU to run on a single CPU */
> - HANDLE h;
> - DWORD_PTR mask, smask;
> - int i;
> -
> SetConsoleCtrlHandler(qemu_ctrl_handler, TRUE);
> -
> - h = GetCurrentProcess();
> - if (GetProcessAffinityMask(h, &mask, &smask)) {
> - for(i = 0; i < 32; i++) {
> - if (mask & (1 << i))
> - break;
> - }
> - if (i != 32) {
> - mask = 1 << i;
> - SetProcessAffinityMask(h, mask);
> - }
> - }
> }
>
> /* Look for support files in the same directory as the executable. */
> --
> 1.8.1.2
>
>
>