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

Make PtrQueue free list lock-free

XMLWordPrintable

    • gc
    • b05
    • generic
    • generic

      The PtrQueue class provides a free list for recycling buffers that have been used and processed. This free list is presently protected by a Mutex. Because the free list may need to be accessed as part of an Access barrier, the mutex must have "access" rank. This mutex can also be a significant source of contention.

      This free list could use a lock-free stack. The ABA problem for pop operations can be addressed by using GlobalCounter critical sections. A pop operation is performed within a critical section. A push operation first write_synchronizes then adds the buffer to the list. This puts any delays on the "GC" processing side of the free list, making the mutator pops to obtain buffers inexpensive.

            kbarrett Kim Barrett
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: