sw64: optimize idle routine
Sunway inclusion category: performance bugzilla: https://gitee.com/openeuler/kernel/issues/I73KFC -------------------------------- On SW64, the HALT instruction can only be executed when interrupts are enabled. However, if there happen to be a interrupt right before the HALT instruction, we could have such scenario that the interrupt handler returned to the HALT instruction, and we have to wait for the next interrupt to reschedule. Currently, a pending interrupt will usually interrupt the first instruction of an instruction group, so we are putting the process of checking TIF_NEED_RESCHED flag and the HALT instruction in the same instruction group. Hopefully this will minimize the chance of the scenario described above. Signed-off-by:Mao Minkai <maominkai@wxiat.com> Reviewed-by:
He Sheng <hesheng@wxiat.com> Signed-off-by:
Gu Zitao <guzitao@wxiat.com>
Loading
Please sign in to comment