Fiber try out feedback

Lei Yu lei.yul at alibaba-inc.com
Fri Jul 19 08:48:12 UTC 2019


Hi,

Here are some feedback on our try out of loom from Alibaba.
We have written a test of the message passing between the Fibers to verify the performance under high concurrency.
1. An assertion error occurred while running the test(can be reproduced by the code in the attachment):
java.lang.AssertionError
       at java.base/java.lang.Continuation.resizeStack(Continuation.java:685)
       at java.base/java.lang.Continuation.maybeShrink(Continuation.java:671)
       at java.base/java.lang.Continuation.postYieldCleanup(Continuation.java:465)
       at java.base/java.lang.Continuation.run(Continuation.java:341)
       at java.base/java.lang.Fiber.runContinuation(Fiber.java:367)
       at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1425)
       ...

I think the deeper reason is that the value of Continuation.sp has been changed between maybeShrink() and resizeStack().

2. Thaw/Freeze interpreter frame will be slowed down by compute_oop_map significantly.
[image.png]

If a Fiber is executing as a consumer of a BlockingQueue in loop, we can frequently observe the interpreter frame exists even though compilation occurs,
thaw/freeze interpreter frame may become a performance bottleneck.

Thanks 
Lei Yu


More information about the loom-dev mailing list