Bad asymptotics on gencgc for pinned objects

Bug #803085 reported by Paul Khuong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Triaged
Low
Unassigned

Bug Description

Pinned large objects objects are considered completely dirty and remain so until they're not pinned anymore. For instance, the following shows a pretty clear linear growth in the size of the array, even though there is only a single write to the vector (linux/amd64/1.0.49.x).

The remembered set should be more precise, at least for very large vectors, which I expect are the only cases that could happen in the wild.

(defun test (length &optional (repeat 10))
  (let ((x (make-array length)))
    (setf (aref x 0) 0)
    (time (dotimes (i repeat)
            (gc)))))

* (gc :full t) (test (* 64 4096 4096))

NIL
*
Evaluation took:
  18.129 seconds of real time
  17.877118 seconds of total run time (17.313082 user, 0.564036 system)
  [ Run times consist of 17.877 seconds GC time, and 0.001 seconds non-GC time. ]
  98.61% CPU
  50,634,721,036 processor cycles
  4,512 bytes consed

NIL
* (gc :full t) (test (* 8 4096 4096))

NIL
*
Evaluation took:
  2.284 seconds of real time
  2.244140 seconds of total run time (2.172135 user, 0.072005 system)
  [ Run times consist of 2.245 seconds GC time, and 0.000 seconds non-GC time. ]
  98.25% CPU
  6,377,437,976 processor cycles
  4,512 bytes consed

NIL
* (gc :full t) (test (* 4096 4096))

NIL
*
Evaluation took:
  0.289 seconds of real time
  0.288018 seconds of total run time (0.276017 user, 0.012001 system)
  [ Run times consist of 0.284 seconds GC time, and 0.005 seconds non-GC time. ]
  99.65% CPU
  805,982,844 processor cycles
  3,920 bytes consed

NIL

Tags: gc
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.