RFR: Unconditional conditional card marking

Y. Srinivas Ramakrishna ysr at openjdk.org
Mon Apr 24 15:57:33 UTC 2023


On Fri, 21 Apr 2023 19:11:33 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> > Changes look good.
> > Historically, however, conditional card marks were found to reduce performance, but may be there is newer data that shows that it's better to use conditional card marks to reduce cache coherency traffic as the core counts and cache sizes have both gone up?
> 
> The last time I checked (10 years ago!), the break-even was somewhere around 4..8 active mutator (benchmark) threads. With 512 bytes per byte of card, 64 bytes per cache line, the "collision window" is about 32K of Java heap, which is "only" 32K collision regions on 1 GB heap. A rather tiny part of the heap is usually under heavy card updates (basically, old space), so actual collision window is much smaller...
> 
> > Can we collect some fresh relative performance numbers?
> 
> Yes, I would like to go upstream and argue that in 2023, at least Parallel should default to `UseCondCardMark = true`, or maybe we should be just dropping the flag completely :)
> 
> I can table this PR until we have a discussion about the current status of conditional card marking upstream. But then again, G1 enables it always, so...

In the long run that would be good to do but, for the scope of this change, I think it'd be sufficient to gather data with a benchmark or two showing that conditional card marking is beneficial compared with unconditional specifically for GenShen.

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

PR Comment: https://git.openjdk.org/shenandoah/pull/264#issuecomment-1520432787


More information about the shenandoah-dev mailing list