• Yunfeng Ye's avatar
    arm64: psci: Reduce the waiting time for cpu_psci_cpu_kill() · bfcef4ab
    Yunfeng Ye authored
    In cases like suspend-to-disk and suspend-to-ram, a large number of CPU
    cores need to be shut down. At present, the CPU hotplug operation is
    serialised, and the CPU cores can only be shut down one by one. In this
    process, if PSCI affinity_info() does not return LEVEL_OFF quickly,
    cpu_psci_cpu_kill() needs to wait for 10ms. If hundreds of CPU cores
    need to be shut down, it will take a long time.
    
    Normally, there is no need to wait 10ms in cpu_psci_cpu_kill(). So
    change the wait interval from 10 ms to max 1 ms and use usleep_range()
    instead of msleep() for more accurate timer.
    
    In addition, reducing the time interval will increase the messages
    output, so remove the "Retry ..." message, instead, track time and
    output to the the sucessful message.
    Signed-off-by: default avatarYunfeng Ye <yeyunfeng@huawei.com>
    Reviewed-by: default avatarSudeep Holla <sudeep.holla@arm.com>
    Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    bfcef4ab
psci.c 2.64 KB