fix a problem with bad performance after wakeup caused by r333321
This change reverts a "while here" part of r333321 that moved clearing of suspended_cpus to an earlier place. Apparently, there can be a problem when modifying (shared) memory before restoring proper cache attributes. So, to be safe, move the clearing to the old place. Many thanks to Johannes Lundberg for bisecting the changes to that particular commit and then bisecting the commit to the particular change. Reported by: many Debugged by: Johannes Lundberg <johalun0@gmail.com> MFC after: 1 week X-MFC with: r333321
This commit is contained in:
parent
bb5125a411
commit
7973b47369
@ -1457,8 +1457,6 @@ cpususpend_handler(void)
|
||||
*/
|
||||
wbinvd();
|
||||
} else {
|
||||
/* Indicate that we have restarted and restored the context. */
|
||||
CPU_CLR_ATOMIC(cpu, &suspended_cpus);
|
||||
#ifdef __amd64__
|
||||
fpuresume(susppcbs[cpu]->sp_fpususpend);
|
||||
#else
|
||||
@ -1468,6 +1466,9 @@ cpususpend_handler(void)
|
||||
initializecpu();
|
||||
PCPU_SET(switchtime, 0);
|
||||
PCPU_SET(switchticks, ticks);
|
||||
|
||||
/* Indicate that we have restarted and restored the context. */
|
||||
CPU_CLR_ATOMIC(cpu, &suspended_cpus);
|
||||
}
|
||||
|
||||
/* Wait for resume directive */
|
||||
|
Loading…
x
Reference in New Issue
Block a user