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

ZGC: Remove unnecessary page reset when splitting pages

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 24
    • None
    • hotspot
    • gc
    • b14

    Description

      Split returns a new page (N) of the initial (lower) part and modifies the existing page (P) to be the smaller. Currently, P is reset after splitting by calling ZPage::reset with ZPageResetType::Splitting.

      Before split:
      [ page ]

      After split:
      [ return (N) | same page (P) ]

      The call hierarchies to ZPage::split_with_pmem are:

      P is inserted into the page cache and will be reset with ZPageResetType::Allocation if used later on
      ZPageCache::alloc_page
      ZPage::split(size_t split_of_size)
      ZPage::split(ZPageType type, size_t split_of_size)
      ZPage::split_with_pmem

      P is in a linked-list to harvest its physical memory when flushing the page cache
      ZPageCache::flush
      ZPage::split(ZPageType type, size_t split_of_size)
      ZPage::split_with_pmem

      P is destroyed immediately after calling split
      ZPageAllocator::alloc_page_finalize
      ZPage::split_committed
      ZPage::split_with_pmem

      None of these use-cases requires the page (P) to be reset after splitting and thus the reset should be removed.

      Attachments

        Issue Links

          Activity

            People

              jsikstro Joel Sikstrom
              jsikstro Joel Sikstrom
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: