[PATCH] Add a counter and debug printf to change the latency inside tlb_sync

Chao-ying Fu icebergfu at gmail.com
Thu Jan 9 18:16:49 PST 2025


On Thu, Jan 9, 2025 at 5:18 PM Bo Gan <ganboing at gmail.com> wrote:
>
> Hi Chaoying,
>
> I don't think this patch does anything at all. Using printf to delay is naive.
> Can you give concrete example of how the livelock happened and when it happens
> some precise number on the performance impact?

Yes, the patch is naive, and we can treat it as the debug patch.
However, this patch does help us to avoid livelock.
>From our 24-hart configuration, one hart cannot update the variable
tlb_sync, because another hart always wins to read the value. Then,
the tlb_sync loop never exits.

The performance impact is minimal, I think. But, I don't have precise numbers.
Thanks a lot!

Regards,
Chao-ying



More information about the opensbi mailing list