IP Library › Granted Patent US 10,297,003
Granted Patent B2
US 10,297,003 · App. 14/859,861 · Granted May 21, 2019

Efficient saving and restoring of context information for context switches

Inventor: Anirudh Rajendra Acharya (San Diego, CA)
Assignee: QUALCOMM Incorporated
G06T1/60G06F9/461G06T1/20
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,297,003
App. No.
14/859,861
Granted
May 21, 2019
Kind
B2
Abstract

This disclosure describes techniques for context switching. In one example, a graphics processing unit may be configured to generate one or more signatures for context information stored in on-chip memory of the graphics processing unit, determine whether the one or more signatures match any previously generated signatures for context information stored in one or more memories accessible by the graphics processing unit, store, to at least one of the one or more memories, any signature of the one or more signatures that is determined not to match any previously generated signature stored in at least one of the one or more memories, and store, to at least one of the one or more memories, the context information respectively corresponding to the one or more signatures determined not to match any previously generated signature stored in at least one of the one or more memories.

Claims (59)

1. A method for context switching by a graphics processing unit, the method comprising:

receiving a context switch triggering event to context switch from a switched-out process to a switched-in process;

applying a signature algorithm to current context information stored in on-chip memory of the graphics processing unit to generate a plurality of signatures for the current context information, wherein the signature algorithm comprises one or more of a hash algorithm, a cyclic redundancy check (CRC) algorithm, or a bloom filter signature algorithm, and the plurality of signatures comprise one or more of a hash value, a CRC value, or a bloom filter signature value;

determining that a first subset of the plurality of signatures do not match any previously generated signature for previous context information stored in one or more off-chip memories accessible by the graphics processing unit, wherein the first subset of the plurality of signatures corresponds to a first subset of context information of the current context information;

determining that a second subset of the plurality of signatures match one or more of the previously generated signatures for the previous context information stored in the one or more off-chip memories accessible by the graphics processing unit, wherein the second subset of the plurality of signatures corresponds to a second subset of context information of the current context information;

for the first subset of the plurality of signatures:

storing, to at least one of the one or more off-chip memories, each signature of the first subset of the plurality of signatures that is determined not to match any previously generated signature stored in at least one of the one or more off-chip memories; and

storing, to at least one of the one or more off-chip memories, the first subset of context information respectively corresponding to the first subset of the plurality of signatures determined not to match any previously generated signature stored in at least one of the one or more off-chip memories;

for the second subset of the plurality of signatures:

avoid storing each signature of the second subset of the plurality of signatures that is determined to match the one or more of the previously generated signatures stored in at least one of the one or more off-chip memories;

restoring, from the one or more off-chip memories, the first subset of context information respectively corresponding to the first subset of the plurality of signatures;

avoiding restoring, from the one or more off-chip memories, the second subset of context information corresponding to the second subset of the plurality of signatures; and

executing the switched-in process.

2. The method of claim 1 , wherein the current context information corresponds to a preempted process, and wherein the previous context information corresponds to one or more previously preempted processes.

3. The method of claim 1 , wherein applying the signature algorithm to generate the plurality of signatures for the current context information comprises applying one or more signature algorithms to one or more of the following: the current context information, one or more groups of the current context information, and one or more types of the current context information.

4. A device comprising:

a graphics processing unit configured to perform context switching, wherein the graphics processing unit has on-chip memory; and

a memory external to the graphics processing unit, wherein the graphics processing unit is configured to:

receive a context switch triggering event to context switch from a switched-out process to a switched-in process;

apply a signature algorithm to current context information stored in on-chip memory of the graphics processing unit to generate a plurality of signatures for the current context information, wherein the signature algorithm comprises one or more of a hash algorithm, a cyclic redundancy check (CRC) algorithm, or a bloom filter signature algorithm, and the plurality of signatures comprise one or more of a hash value, a CRC value, or a bloom filter signature value;

determine that a first subset of the plurality of signatures do not match any previously generated signature for previous context information stored in one or more off-chip memories accessible by the graphics processing unit, wherein the first subset of the plurality of signatures corresponds to a first subset of context information of the current context information;

determine that a second subset of the plurality of signatures match one or more of the previously generated signatures for the previous context information stored in the one or more off-chip memories accessible by the graphics processing unit, wherein the second subset of the plurality of signatures corresponds to a second subset of context information of the current context information;

for the first subset of the plurality of signatures:

store, to at least one of the one or more off-chip memories, each signature of the first subset of the plurality of signatures that is determined not to match any previously generated signature stored in at least one of the one or more off-chip memories; and

store, to at least one of the one or more off-chip memories, the first subset of context information respectively corresponding to the first subset of the plurality of signatures determined not to match any previously generated signature stored in at least one of the one or more off-chip memories;

for the second subset of the plurality of signatures:

avoid storing each signature of the second subset of the plurality of signatures that is determined to match any the one or more of the previously generated signatures stored in at least one of the one or more off-chip memories;

restore, from the one or more off-chip memories, the first subset of context information respectively corresponding to the first subset of the plurality of signatures;

avoid restoring, from the one or more off-chip memories, the second subset of context information corresponding to the second subset of the plurality of signatures; and

execute the switched-in process.

5. The device of claim 4 , wherein the current context information corresponds to a preempted process, and wherein the previous context information corresponds to one or more previously preempted processes.

6. The device of claim 4 , wherein to apply the signature algorithm to generate the plurality of signatures for the current context information, the graphics processing unit is configured to apply one or more signature algorithms to one or more of the following: the current context information, one or more groups of the current context information, and one or more types of the current context information.

7. An apparatus comprising a graphics processing unit, the graphics processing unit comprising:

means for receiving a context switch triggering event to context switch from a switched-out process to a switched-in process;

means for applying a signature algorithm to current context information stored in on-chip memory of the graphics processing unit to generate a plurality of signatures for the current context information, wherein the signature algorithm comprises one or more of a hash algorithm, a cyclic redundancy check (CRC) algorithm, or a bloom filter signature algorithm, and the plurality of signatures comprise one or more of a hash value, a CRC value, or a bloom filter signature value;

means for determining that a first subset of the plurality of signatures do not match any previously generated signature for previous context information stored in one or more off-chip memories accessible by the graphics processing unit, wherein the first subset of the plurality of signatures corresponds to a first subset of context information of the current context information;

means for determining that a second subset of the plurality of signatures match one or more of the previously generated signatures for the previous context information stored in the one or more off-chip memories accessible by the apparatus, wherein the second subset of the plurality of signatures corresponds to a second subset of context information of the current context information;

for the first subset of the plurality of signatures:

means for storing, to at least one of the one or more off-chip memories, each signature of the first subset of the plurality of signatures that is determined not to match any previously generated signature stored in at least one of the one or more off-chip memories; and

means for storing, to at least one of the one or more off-chip memories, the first subset of context information respectively corresponding to the first subset of the plurality of signatures determined not to match any previously generated signature stored in at least one of the one or more off-chip memories;

for the second subset of the plurality of signatures:

means for avoiding storing each signature of the second subset of the plurality of signatures that is determined to match the one or more of the previously generated signatures stored in at least one of the one or more off-chip memories;

means for restoring, from the one or more off-chip memories, the first subset of context information respectively corresponding to the first subset of the plurality of signatures;

means for avoiding restoring, from the one or more off-chip memories, the second subset of context information corresponding to the second subset of the plurality of signatures; and

means for executing the switched-in process.

8. The apparatus of claim 7 , wherein the means for applying the signature algorithm to generate the plurality of signatures for the current context information comprises means for applying one or more signature algorithms to one or more of the following: the current context information, one or more groups of the current context information, and one or more types of the current context information.

9. A non-transitory computer-readable storage medium having instructions stored thereon that, when executed, cause one or more processors of a computing device to:

receive a context switch triggering event to context switch from a switched-out process to a switched-in process;

apply a signature algorithm to current context information stored in on-chip memory of the graphics processing unit to generate a plurality of signatures for the current context information, wherein the signature algorithm comprises one or more of a hash algorithm, a cyclic redundancy check (CRC) algorithm, or a bloom filter signature algorithm, and the plurality of signatures comprise one or more of a hash value, a CRC value, or a bloom filter signature value;

determine that a first subset of the plurality of signatures do not match any previously generated signature for previous context information stored in one or more off-chip memories accessible by the graphics processing unit, wherein the first subset of the plurality of signatures corresponds to a first subset of context information of the current context information;

determine that a second subset of the plurality of signatures match one or more of the previously generated signatures for the previous context information stored in the one or more off-chip memories accessible by the graphics processing unit, wherein the second subset of the plurality of signatures corresponds to a second subset of context information of the current context information;

for the first subset of the plurality of signatures:

store, to at least one of the one or more off-chip memories, each signature of the first subset of the plurality of signatures that is determined not to match any previously generated signature stored in at least one of the one or more off-chip memories; and

store, to at least one of the one or more off-chip memories, the first subset of context information respectively corresponding to the first subset of the plurality of signatures determined not to match any previously generated signature stored in at least one of the one or more off-chip memories;

for the second subset of the plurality of signatures:

avoid storing each signature of the second subset of the plurality of signatures that is determined to match the one or more of the previously generated signatures stored in at least one of the one or more off-chip memories;

restore, from the one or more off-chip memories, the first subset of context information respectively corresponding to the first subset of the plurality of signatures;

avoid restoring, from the one or more off-chip memories, the second subset of context information corresponding to the second subset of the plurality of signatures; and

execute the switched-in process.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 11, 2015
From: ACHARYA, ANIRUDH RAJENDRA
To: QUALCOMM INCORPORATED
Reel/Frame 037011/0372 →
Continuity (1)
Related Publication 20170083998A1 · Mar 23, 2017