[jdk17] RFR: 8269865: Async UL needs to handle ERANGE on exceeding SEM_VALUE_MAX [v3]

Xin Liu xliu at openjdk.java.net
Tue Jul 13 22:11:15 UTC 2021


On Wed, 7 Jul 2021 02:35:12 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Xin Liu has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - Ignore sem_post failure when _sem of AsyncLogWriter is overflown.
>>  - Revert "8269865: Async UL needs to handle ERANGE on exceeding SEM_VALUE_MAX"
>>    
>>    This reverts commit 269a1580990fa955c1f9d37ce1d04a6349959992.
>>  - Revert "Fix build issue on Windows and simplify the loop."
>>    
>>    This reverts commit e385f42fa4e03510242039518281077e3c9897cf.
>
> I ran a test on Linux, Windows and OSX. As expected Linux gives EOVERFLOW. OSX the test just times out without error.
> 
> On Windows we get error 298:
> 
> ERROR_TOO_MANY_POSTS
>     298 (0x12A)
>     Too many posts were made to a semaphore.
> 
> so I think we should check for that and ignore it if ignoring overflow.
> 
> Thanks,
> David

hi, @dholmes-ora @pchilano, 

Thank you for letting me know os::PlatformMonitor. I used to think Monitor is a higher-level synchronization construct than Semaphore. it turns out that os::PlatformMonitor is as low-level as semaphore. Lesson learned. 

Could you take a look at this change and see if I use it correctly? 

thanks,
--lx

-------------

PR: https://git.openjdk.java.net/jdk17/pull/216


More information about the hotspot-runtime-dev mailing list