[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-runtime-dev
Subject:    Inlining SpinPause
From:       Jungwoo Ha <jwha () google ! com>
Date:       2014-07-15 23:42:30
Message-ID: CA+n_jhjbyb4BEqqWYrKsdmsj-59en+23mZXW_U4y4RPkyWtitw () mail ! gmail ! com
[Download RAW message or body]

Hi,

We observed that inlining PAUSE instruction on x86 actually makes some
noticeable difference when hyper-threading is on. (And that is the
recommended way of using PAUSE by Intel)
I think this is either the effect of saving branch forwarding in HT
pipeline or giving more cycles to the other threads that is not spinning on
the same core.

While trying to fix it, it is difficult to make global SpinPause
(hand-written assembly) without moving it under os:: namespace or someplace
else.

On os.hpp, I see the comment that SpinPause should be moved to
Atomic::SpinPause.
If I move SpinPause to Atomic:: and make it inlineable on x86, would that
be a change you guys are interested?

--
Jungwoo Ha
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic