Bill Holler wrote:> Hi. Hopefully this is the correct forum.... > > Solaris Nevada and soon Solaris 10 Update 5 will use the MWAIT instruction, > on supporting hardware, in the cpu idle loop to halt idle processors. > > IIRC QEMU cannot emulate the MWAIT instruction; instead QEMU lets the > processor continue. This is the same as a "false wakeup". At least that is > what I remember seeing in the QEMU code a few months ago.If this is true, isn''t the right fix to have QEMU''s CPUID not report MWAIT support?> IIRC QEMU > does support the HLT instruction. If this is correct, Solaris under QEMU > will effectively have a "spin" idle loop due to MWAIT not working. > This will be horrible for an MP system performance under QEMU due > to QEMU''s single threaded main loop. > > It may be best to disable Solaris''s use of MWAIT in the idle loop when > run under QEMU. set idle_cpu_prefer_mwait = 0 in kmdb during boot > or in /etc/system. > > Please let me know if Solaris should not use a HLT idle loop when > run under QEMU. > > Regards, > Bill > _______________________________________________ > qemu-discuss mailing list > qemu-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/qemu-discuss
Hi. Hopefully this is the correct forum.... Solaris Nevada and soon Solaris 10 Update 5 will use the MWAIT instruction, on supporting hardware, in the cpu idle loop to halt idle processors. IIRC QEMU cannot emulate the MWAIT instruction; instead QEMU lets the processor continue. This is the same as a "false wakeup". At least that is what I remember seeing in the QEMU code a few months ago. IIRC QEMU does support the HLT instruction. If this is correct, Solaris under QEMU will effectively have a "spin" idle loop due to MWAIT not working. This will be horrible for an MP system performance under QEMU due to QEMU''s single threaded main loop. It may be best to disable Solaris''s use of MWAIT in the idle loop when run under QEMU. set idle_cpu_prefer_mwait = 0 in kmdb during boot or in /etc/system. Please let me know if Solaris should not use a HLT idle loop when run under QEMU. Regards, Bill
Dan Mick wrote:> Bill Holler wrote: >> Hi. Hopefully this is the correct forum.... >> >> Solaris Nevada and soon Solaris 10 Update 5 will use the MWAIT >> instruction, >> on supporting hardware, in the cpu idle loop to halt idle processors. >> >> IIRC QEMU cannot emulate the MWAIT instruction; instead QEMU lets the >> processor continue. This is the same as a "false wakeup". At least >> that is >> what I remember seeing in the QEMU code a few months ago. > > If this is true, isn''t the right fix to have QEMU''s CPUID not report > MWAIT support?It would depend on if the user wanted to emulate MONITOR/MWAIT at a drastic MP performance expense or not. Most users would not. A quick google search did not reveal if CPUID does not report MWAIT support on a QEMU cpu, but I suspect it does not? Bill>> IIRC QEMU >> does support the HLT instruction. If this is correct, Solaris under >> QEMU >> will effectively have a "spin" idle loop due to MWAIT not working. >> This will be horrible for an MP system performance under QEMU due >> to QEMU''s single threaded main loop. >> >> It may be best to disable Solaris''s use of MWAIT in the idle loop when >> run under QEMU. set idle_cpu_prefer_mwait = 0 in kmdb during boot >> or in /etc/system. >> >> Please let me know if Solaris should not use a HLT idle loop when >> run under QEMU. >> >> Regards, >> Bill >> _______________________________________________ >> qemu-discuss mailing list >> qemu-discuss at opensolaris.org >> http://mail.opensolaris.org/mailman/listinfo/qemu-discuss >
Does QEMU support MONITOR/MWAIT? Bill Dan Mick wrote:> Bill Holler wrote: >> Hi. Hopefully this is the correct forum.... >> >> Solaris Nevada and soon Solaris 10 Update 5 will use the MWAIT >> instruction, >> on supporting hardware, in the cpu idle loop to halt idle processors. >> >> IIRC QEMU cannot emulate the MWAIT instruction; instead QEMU lets the >> processor continue. This is the same as a "false wakeup". At least >> that is >> what I remember seeing in the QEMU code a few months ago. > > If this is true, isn''t the right fix to have QEMU''s CPUID not report > MWAIT support? > >> IIRC QEMU >> does support the HLT instruction. If this is correct, Solaris under >> QEMU >> will effectively have a "spin" idle loop due to MWAIT not working. >> This will be horrible for an MP system performance under QEMU due >> to QEMU''s single threaded main loop. >> >> It may be best to disable Solaris''s use of MWAIT in the idle loop when >> run under QEMU. set idle_cpu_prefer_mwait = 0 in kmdb during boot >> or in /etc/system. >> >> Please let me know if Solaris should not use a HLT idle loop when >> run under QEMU. >> >> Regards, >> Bill >> _______________________________________________ >> qemu-discuss mailing list >> qemu-discuss at opensolaris.org >> http://mail.opensolaris.org/mailman/listinfo/qemu-discuss >