Recherche Images Maps Play YouTube Actualités Gmail Drive Plus »
Recherche avancée dans les brevets | Images de page | Historique Web | Connexion

Brevets

  
[merged small][merged small][merged small][merged small][merged small][merged small][subsumed][merged small][merged small][merged small][graphic][subsumed]
[blocks in formation]

Build list of any required or desired memory resources and list of potential split point(s) for the DMA buffer if not all memory resources can be paged in at the same time.

If the ready list is empty and no DMA buffer is currently being prepared:

If all the memory resources for the current DMA buffer are already present in memory, ask the driver to patch the DMA buffer and submit it to the hardware;

If some memory resources need to be paged-in, submit the DMA buffer to the

worker thread.

PROCESS B: Quantum expires (irql device, any thread context)

If the current task is still processing its paging buffer:

Allow the current task to continue running, set the current quantum as expired.

If next task is ready to be run:

Start next task;

Reset the quantum to "running" (not expired);

If the task requires importing memory resources, submit it to the worker thread;

If all memory resources are present, ask the driver to patch the next DMA buffer.

If next task is not ready to be run:

Allow the current task to continue running, set the current quantum to "expired.'

FIGURE 4(A)

Exemplary algorithm

PROCESS C: Task finishes (irql device., any thread context)

If the next task is ready:

Start next task;

Reset the quantum to "running";

Choose the next task to run.

If the task requires importing memory resources, submit it to the worker thread.

If all memory resources are present, ask the driver to patch the next DMA buffer.

If the next task is not ready:

Stall the coprocessor while the worker thread completes the next task setup or until an application submits a new buffer;

During worker thread completion, the priority of the worker thread is boosted so the worker thread finishes its work as soon as possible.

FIGURE 4(B)

[merged small][merged small][merged small][merged small][merged small][merged small][table][table]

Pseudo command (not necessarily in the DMA buffer as a memory resources programmation). This is a marker used by the driver to indicate that this memory resource isn't used beyond this point (for example, a texture stage state where it was bounded may have been deactivated).

[table]
[blocks in formation]

Exemplary algorithm

Provide a list of memory resources to a supplemental memory manager;

The supplemental memory manager returns a list of memory resources that be moved, optionally specifying a move location. This list is called a "command list" for purposes of this description.

If the video memory manager can't find a location for memory resources in the list, it can chose some allocated memory to evict;

The supplemental memory manager can go through the list and inspect the segments;

If the current process working set is below the commit limit in that segment.

Mark some surfaces for eviction according to the current eviction policy;

Increase the current eviction policy to be harsher next time around;

Go back to the first step and try allocating suplemental memory again;

If the current process is requiring more memory than the current commit limit;

Split the DMA buffer based on the split point built from the timetable for memory resources;

If the DMA buffer can't be split further but not all the memory resources have been marked for eviction yet;

Mark everything for eviction;

Reduce the priority of the application causing the trashing so it doesn't cause as much trouble in the future;

37"

Go back to the first step and try allocating supplemental memory again;

If the DMA buffer can't be split further and all memory resources have been marked for eviction already;

Reject the current DMA buffer for the application. Since this DMA buffer may have contained important state metrics, this process can be discontinued, and the application can be informed of the error.

FIGURE 6

« PrécédentContinuer »