Module mmtk::scheduler::work

source ·

Traits§

  • This defines a GC work packet which are assigned to the GCWorkers by the scheduler. Work packets carry payloads that indicate the work to be done. For example, a work packet may contain a pointer to a stack that must be scanned, or it may contain a large buffer of pointers that need to be traced, or it might contain a range of static variables to be scanned, etc. The size of the work packet will need to consider at least two points of tension: the work packet must be large enough to ensure that the costs of managing the work packets do not dominate, and the packet must be small enough that good load balancing is achieved.
  • This trait provides a group of associated types that are needed to create GC work packets for a certain plan. For example, GCWorkScheduler.schedule_common_work() needs this trait to schedule different work packets. For certain plans, they may need to provide several types that implement this trait, e.g. one for nursery GC, one for mature GC.