Skip to content

[mingw-w64-cross-winpthreads] pthread_spin_lock() takes a lot of time #6199

@xiaowen64

Description

@xiaowen64

Description / Steps to reproduce the issue

I found my code became significantly slower back in last October and VTune revealed the majority of time spent is in pthread_spin_lock(). I didn't report right away because libwinpthread.dll was changing rapidly at that time. Now I found the problem is still there. My code use boost::asio for thread pooling and a lot of context switches are expected. I understand on windows, one should never use spinlock. Could this sudden perf degradation be caused by some change of low-level threading model in libwinptghread?

Expected behavior

spinlock should not take significant time.

Actual behavior

spinlock takes 99% of the time

Verification

Windows Version

MINGW64_NT-10.0-26200

Are you willing to submit a PR?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions