Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8294753

Document why G1CardCounts::add_card_count is not thread-safe

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Not an Issue
    • Icon: P4 P4
    • tbd
    • 20
    • hotspot
    • gc

      `G1CardCounts::add_card_count` is called by refinement threads, and access to `_card_counts` table are not atomic and can result into update loss.

      This may result in treating a hot card as cold.

      The implemented behavior is intentional: the overhead of making this access atomic is highly suspected to be larger than the gain from one or the other card wrongly added (or not added) to the hot card cache.

      Document this design decision

            Unassigned Unassigned
            ayang Albert Yang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: