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

List:       openjdk-hotspot-gc-dev
Subject:    Re: RFR: 8256938: Improve remembered set sampling task scheduling
From:       Albert Mingkun Yang <ayang () openjdk ! java ! net>
Date:       2020-11-26 10:04:59
Message-ID: JeDAukVyWURQMxKk2vra6EDrTbAIKJS9DcreTTcfk48=.3b793c35-8746-44ab-ba08-f6021c22ad8e () github ! com
[Download RAW message or body]

On Thu, 26 Nov 2020 08:36:48 GMT, Stefan Johansson <sjohanss@openjdk.org> wrote:

> > > might round down to 299ms (when the interval is 300ms), even if we are just a \
> > > microsecond away.
> > 
> > In that case, using `> 0` will just delay the start of the task for ~1ms, right? \
> > Doesn't sound like a serious problem. Similarly, `> 1` could cause the task to be \
> > run ~1ms earlier than its intended 300ms interval, right? Either way is fine, but \
> > I think `>0` is less surprising.
> 
> One would think :) But the rounding comes back the other way around, if we \
> reschedule to 1ms in the future, the service thread will look at the timestamp a \
> bit later and then the time left will be rounded down to 0ms. So the effect will be \
> that the task is rescheduled and run instantly over and over until the time since \
> GC is over the interval.

Resolved my confusion via private chat. Thank you for the explanation. This PR is \
good to go.

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

PR: https://git.openjdk.java.net/jdk/pull/1428


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

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