RFR: 8323807: Async UL: Add a stalling mode to async UL [v2]
Johan Sjölen
jsjolen at openjdk.org
Tue Apr 2 08:13:06 UTC 2024
On Thu, 28 Mar 2024 06:34:36 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Johan Sjölen has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 41 additional commits since the last revision:
>>
>> - Merge remote-tracking branch 'origin/master' into ul-async-producer-consumer-take2
>> - Missing N
>> - Move constructors out of header file
>> - Style
>> - Correctly implement stalling
>> - Missed one
>> - Fix lossy conversions in tests
>> - Merge remote-tracking branch 'origin/master' into ul-async-producer-consumer-take2
>> - Only include sys/mman on Linux
>> - Revert back to original Linux impl
>> - ... and 31 more: https://git.openjdk.org/jdk/compare/7f4cd428...8c4ced0f
>
> src/hotspot/share/logging/circularStringBuffer.cpp line 35:
>
>> 33: const char* allocation_failure_msg = "Failed to allocate async logging buffer";
>> 34:
>> 35: #ifdef LINUX
>
> Why do we want/need a specialized version for Linux?
It's an optimization. We perform a different memory mapping on Linux (described in header), this allows for describing the API operations as a single `memcpy`. The other platforms require two. This has been observed to have tangible perf benefits in the past (see [0]). The other OS:s also supports this kind of memory mapping, but I wanted to scale the PR back in size and dev. effort so I focused on Linux.
[0] https://lo.calho.st/posts/black-magic-buffer/ `slow: 0.012196 microseconds per write
fast: 0.004024 microseconds per write`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17757#discussion_r1547361294
More information about the hotspot-runtime-dev
mailing list