Commit f707b504 authored by Mao Minkai's avatar Mao Minkai Committed by guzitao
Browse files

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: default avatarMao Minkai <maominkai@wxiat.com>
Reviewed-by: default avatarHe Sheng <hesheng@wxiat.com>
Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent cf251ab2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment