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

Filter out entries to free/uncommitted regions during iteration

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 12
    • Component/s: hotspot
    • Subcomponent:
      gc
    • Resolved In Build:
      b18

      Description

      The fix for JDK-8069034 introduced some filtering in the eager reclaim code path when iterating over the remembered sets of humongous objects to avoid marking cards in free regions dirty, which gives some assertions. This showed that the remembered sets may contain references to already freed regions (or otherwise known invalid areas), which are problematic in many ways:

       - we cannot uncommit the referenced regions because during remembered scanning we scan them
       - we scan areas that are known to not contain any reference, wasting time

      The sources of such "invalid" entries are
        - the sparse remembered set particularly because it is not scrubbed during scrubbing
        - all remembered sets because we only scrub every now and then, but may free regions inbetween (e.g. eager reclaim, mixed gc)

      A nicer way would be to eliminate these useless entries alltogether, some ideas in that direction

      - improve scrubbing for the sparse remembered set
      - filter out entries to currently free regions in the iterator
      - remove entries (per-region remembered set) to freed regions as they are freed; one lazy way would be to count the number of times a region has been freed, during creation of the per-region remembered set store that value, and every time we iterate over them compare these values: if they match, iterate, otherwise reclaim (or start some process to reclaim that memory) etc.

        Attachments

        1. loggc.out
          33.73 MB
          Erik Helin

          Issue Links

            Activity

              People

              • Assignee:
                tschatzl Thomas Schatzl
                Reporter:
                sjohanss Stefan Johansson
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: