pagemigrationcontroller

package
v2.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package pagemigrationcontroller provides an implementation of a PageMigrationController.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataPullReq

type DataPullReq struct {
	sim.MsgMeta
	ToReadFromPhyAddress uint64
	DataTransferSize     uint64
}

A DataPullReq asks remote PMC that holds the page for a page

func (*DataPullReq) Meta

func (r *DataPullReq) Meta() *sim.MsgMeta

Meta returns the meta data associated with the message.

type DataPullReqBuilder

type DataPullReqBuilder struct {
	ToReadFromPhyAddress uint64
	DataTransferSize     uint64
	// contains filtered or unexported fields
}

DataPullReqBuilder can build new Data pull reqs

func (DataPullReqBuilder) Build

func (b DataPullReqBuilder) Build() *DataPullReq

Build creats a new DataPullReq

func (DataPullReqBuilder) WithDataTransferSize

func (b DataPullReqBuilder) WithDataTransferSize(dataTransferSize uint64) DataPullReqBuilder

WithDataTransferSize sets the data transfer size of the request to build.

func (DataPullReqBuilder) WithDst

WithDst sets the destination of the request to build.

func (DataPullReqBuilder) WithReadFromPhyAddress

func (b DataPullReqBuilder) WithReadFromPhyAddress(toReadFromPhyAddress uint64) DataPullReqBuilder

WithReadFromPhyAddress sets the read address of the request to build.

func (DataPullReqBuilder) WithSendTime

func (b DataPullReqBuilder) WithSendTime(
	t sim.VTimeInSec,
) DataPullReqBuilder

WithSendTime sets the send time of the request to build.:w

func (DataPullReqBuilder) WithSrc

WithSrc sets the source of the request to build.

type DataPullRsp

type DataPullRsp struct {
	sim.MsgMeta
	Data []byte
}

A DataPullRsp returns requested data

func (*DataPullRsp) Meta

func (r *DataPullRsp) Meta() *sim.MsgMeta

Meta returns the meta data associated with the message.

type DataPullRspBuilder

type DataPullRspBuilder struct {
	Data []byte
	// contains filtered or unexported fields
}

DataPullRspBuilder can build new Data pull rsps

func (DataPullRspBuilder) Build

func (b DataPullRspBuilder) Build() *DataPullRsp

Build creats a new DataPullRsp

func (DataPullRspBuilder) WithData

func (b DataPullRspBuilder) WithData(Data []byte) DataPullRspBuilder

WithData sets the data to build

func (DataPullRspBuilder) WithDst

WithDst sets the destination of the request to build.

func (DataPullRspBuilder) WithSendTime

func (b DataPullRspBuilder) WithSendTime(
	t sim.VTimeInSec,
) DataPullRspBuilder

WithSendTime sets the send time of the request to build

func (DataPullRspBuilder) WithSrc

WithSrc sets the source of the request to build.

type PageMigrationController

type PageMigrationController struct {
	*sim.TickingComponent

	RemotePMCAddressTable mem.LowModuleFinder

	MemCtrlFinder mem.LowModuleFinder

	DataTransferStartTime sim.VTimeInSec
	DataTransferEndTime   sim.VTimeInSec
	TotalDataTransferTime sim.VTimeInSec
	// contains filtered or unexported fields
}

PageMigrationController control page migration

func NewPageMigrationController

func NewPageMigrationController(
	name string,
	engine sim.Engine,
	memCtrlFinder mem.LowModuleFinder,
	remoteModules mem.LowModuleFinder,
) *PageMigrationController

NewPageMigrationController returns a new controller

func (*PageMigrationController) SetFreq

func (e *PageMigrationController) SetFreq(freq sim.Freq)

SetFreq sets freq

func (*PageMigrationController) Tick

Tick updates the status of a PageMigrationController.

type PageMigrationReqToPMC

type PageMigrationReqToPMC struct {
	sim.MsgMeta
	ToReadFromPhysicalAddress uint64
	ToWriteToPhysicalAddress  uint64
	PMCPortOfRemoteGPU        sim.Port
	PageSize                  uint64
}

A PageMigrationReqToPMC asks the local GPU PMC to transfer a given page from another GPU PMC

func (*PageMigrationReqToPMC) Meta

func (r *PageMigrationReqToPMC) Meta() *sim.MsgMeta

Meta returns the meta data associated with the message.

type PageMigrationReqToPMCBuilder

type PageMigrationReqToPMCBuilder struct {
	ToReadFromPhyAddress uint64
	ToWriteToPhyAddress  uint64
	PMCPortOfRemoteGPU   sim.Port
	PageSize             uint64
	// contains filtered or unexported fields
}

PageMigrationReqToPMCBuilder can build new PMC mgiration requests

func (PageMigrationReqToPMCBuilder) Build

Build creats a new PageMigrationReqToPMC

func (PageMigrationReqToPMCBuilder) WithDst

WithDst sets the destination of the request to build.

func (PageMigrationReqToPMCBuilder) WithPMCPortOfRemoteGPU

func (b PageMigrationReqToPMCBuilder) WithPMCPortOfRemoteGPU(
	pmcPortOfRemoteGPU sim.Port,
) PageMigrationReqToPMCBuilder

WithPMCPortOfRemoteGPU sets the page size.

func (PageMigrationReqToPMCBuilder) WithPageSize

WithPageSize sets the page size.

func (PageMigrationReqToPMCBuilder) WithReadFrom

func (b PageMigrationReqToPMCBuilder) WithReadFrom(toReadFromPhyAddress uint64) PageMigrationReqToPMCBuilder

WithReadFrom sets the read address of the request to build.

func (PageMigrationReqToPMCBuilder) WithSendTime

WithSendTime sets the send time of the request to build.:w

func (PageMigrationReqToPMCBuilder) WithSrc

WithSrc sets the source of the request to build.

func (PageMigrationReqToPMCBuilder) WithWriteTo

func (b PageMigrationReqToPMCBuilder) WithWriteTo(toWriteToPhyAddress uint64) PageMigrationReqToPMCBuilder

WithWriteTo sets the write address of the request to build.

type PageMigrationRspFromPMC

type PageMigrationRspFromPMC struct {
	sim.MsgMeta
}

A PageMigrationRspFromPMC notifies the PMC controlling device of page transfer completion

func (*PageMigrationRspFromPMC) Meta

func (r *PageMigrationRspFromPMC) Meta() *sim.MsgMeta

Meta returns the meta data associated with the message.

type PageMigrationRspFromPMCBuilder

type PageMigrationRspFromPMCBuilder struct {
	// contains filtered or unexported fields
}

PageMigrationRspFromPMCBuilder can build new PMC migration responses

func (PageMigrationRspFromPMCBuilder) Build

Build creats a new PageMigrationReqToPMC

func (PageMigrationRspFromPMCBuilder) WithDst

WithDst sets the destination of the request to build.

func (PageMigrationRspFromPMCBuilder) WithSendTime

WithSendTime sets the send time of the request to build.:w

func (PageMigrationRspFromPMCBuilder) WithSrc

WithSrc sets the source of the request to build.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL