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

ZGC: Remove unnecessary page reset when splitting pages

XMLWordPrintable

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

      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.

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

              Created:
              Updated:
              Resolved: