Starting and joining a lot of threads slower on AMD systems compared to Intel systems

David Holmes david.holmes at oracle.com
Fri May 21 14:37:46 UTC 2021


On 21/05/2021 9:59 pm, Florent Guillaume wrote:
> On Mon, May 17, 2021 at 12:53 AM David Holmes <david.holmes at oracle.com 
> <mailto:david.holmes at oracle.com>> wrote:
> 
>     On 16/05/2021 5:02 pm, Thomas Stüfe wrote:
>      > On Sun, May 16, 2021 at 8:06 AM Thomas Stüfe
>     <thomas.stuefe at gmail.com <mailto:thomas.stuefe at gmail.com>>
>      > wrote:
>      >
>      >> The difference to J9 is annoying though.
>      >>
>      >> It just occurred to me that we have this handshake between
>     creator thread
>      >> and newborn thread. The creator thread waits for the newborn to
>     be up and
>      >> running, in order to avoid inconsistent thread states. Which
>     requires the
>      >> newborn to get at least some cycles, competing with all its
>     siblings.
>      >>
>      >
>      > Which interestingly we don't do for all platforms (not on AIX nor
>     Windows).
>      > Another reason to execute such tests on the same OS and hardware.
> 
>     As Linux/BSD/macOS can't start threads suspended we have to emulate
>     that
>     with this handshake. The reason this is needed is to ensure the newly
>     created thread can't run to completion and delete itself before the
>     creator has finished the initial interaction with it.
> 
> 
> It seems that macOS has the Apple-specific 
> POSIX_SPAWN_START_SUSPENDED to do that.

That is for process creation not threads.

David
-----

> Florent
> 


More information about the discuss mailing list