[PATCH v3 1/2] lib: sbi_init: Avoid thundering hurd problem with coldboot_lock

Bin Meng bmeng.cn at gmail.com
Tue Aug 18 05:16:15 EDT 2020


On Tue, Aug 18, 2020 at 12:09 PM Anup Patel <anup.patel at wdc.com> wrote:
>
> We can have thundering hurd problem with coldboot_lock where the
> boot HART can potentially starve trying to acquire coldboot_lock
> because some of the non-boot HARTs are continuously acquiring and
> releasing coldboot_lock. This can happen if MIP.MSIP bit is already
> set for some of the non-boot HARTs.
>
> To avoid thundering hurd problem for coldboot_lock, we use the
> __smp_load_acquire() and __smp_store_release() for coldboot_done
> flag and use coldboot_lock only for coldboot_wait_hmask.
>
> Signed-off-by: Anup Patel <anup.patel at wdc.com>
> Tested-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> Reviewed-by: Atish Patra <atish.patra at wdc.com>
> ---
>  lib/sbi/sbi_init.c | 20 +++++++++++++-------
>  1 file changed, 13 insertions(+), 7 deletions(-)
>

Reviewed-by: Bin Meng <bin.meng at windriver.com>



More information about the opensbi mailing list