IP Library Granted Patent US 9,626,299
Granted Patent B2
US 9,626,299 · App. 14/701,911 · Granted Apr 18, 2017

Changing a hash function based on a conflict ratio associated with cache sets

Inventors: Francesc Guim Bernat (Barcelona, ES); Alejandro Duran Gonzalez (Barcelona, ES)
Assignee: Intel Corporation
G06F12/1018G06F12/0875G06F12/128G06F2212/621G06F2212/657G06F2212/69
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 9,626,299
App. No.
14/701,911
Granted
Apr 18, 2017
Kind
B2
Abstract

Data and a memory address associated with the data may be received. A hash value of the memory address may be calculated by using a first hash function. The data may be stored at a cache set of a plurality of cache sets of a cache memory based on the hash value calculated from the first hash function. A determination may be made as to whether the storing of the data at the cache set of the plurality of cache sets of the cache memory is associated with a conflict ratio of the cache memory exceeding a threshold ratio. In response to the conflict ratio exceeding the threshold ratio, a second hash value of a second memory address associated with a second data may be calculated by using a second hash function that is different than the first hash function.

Claims (58)

1. A processor comprising:

a memory;

one or more functional units coupled to the memory; and

a hash function selection module coupled to the memory and the one or more functional units and to:

receive data and a memory address associated with the data;

calculate a hash value of the memory address by using a first hash function;

store the data at a cache set of a plurality of cache sets of a cache memory based on the hash value calculated from the first hash function;

determine whether the storing of the data at the cache set of the plurality of cache sets of the cache memory is associated with a conflict ratio of the cache memory exceeding a threshold ratio; and

in response to the conflict ratio exceeding the threshold ratio, calculate a second hash value of a second memory address associated with a second data by using a second hash function that is different than the first hash function.

2. The processor of claim 1 , wherein the hash function selection module is further to:

in response to the conflict ratio not exceeding the threshold ratio, calculate the second hash value of the second memory address associated with the second data by using the same first hash function.

3. The processor of claim 1 , wherein the hash function selection module is further to:

identify the cache set of the plurality of cache sets based on a portion of the hash value calculated from the first hash function.

4. The processor of claim 1 , wherein the conflict ratio is associated with a rate of eviction for memory previously stored in the cache memory.

5. The processor of claim 4 , wherein an eviction corresponding to the rate of eviction is associated with a removal of a previously stored memory from the cache set of the cache memory in response to the storing of the data at the cache set of the plurality of cache sets of the cache memory when the cache set is full.

6. The processor of claim 1 , wherein the hash function selection module is further to:

store the hash value of the memory address with the memory at the cache set of the plurality of cache sets; and

store an identification of the first hash function with the hash value and the data at the cache set of the plurality of cache sets.

7. The processor of claim 6 , wherein the hash value of the memory address, the data, and the identification of the first hash function are stored in a single way of the cache set.

8. The processor of claim 7 , wherein the hash function selection module is further to:

in response to an eviction of the data stored in the single way of the cache set, calculate the memory address of the data based on the hash value, an identification of the cache set storing the data, and the identification of the first hash function.

9. The processor of claim 1 , wherein the use of the second hash function distributes memory among the cache sets of the cache memory differently than the use of the first hash function.

10. A method comprising:

receiving data and a memory address associated with the data;

calculating a hash value of the memory address by using a first hash function;

storing the data at a cache set of a plurality of cache sets of a cache memory based on the hash value calculated from the first hash function;

determining, by a hash function selection module of a processor, whether the storing of the data at the cache set of the plurality of cache sets of the cache memory is associated with a conflict ratio of the cache memory exceeding a threshold ratio; and

in response to the conflict ratio exceeding the threshold ratio, calculating a second hash value of a second memory address associated with a second data by using a second hash function that is different than the first hash function.

11. The method of claim 10 , further comprising:

in response to the conflict ratio not exceeding the threshold ratio, calculating the second hash value of the second memory address associated with the second data by using the same first hash function.

12. The method of claim 10 , further comprising:

identifying the cache set of the plurality of cache sets based on a portion of the hash value calculated from the first hash function.

13. The method of claim 10 , wherein the conflict ratio is associated with a rate of eviction for memory previously stored in the cache memory.

14. The method of claim 13 , wherein an eviction corresponding to the rate of eviction is associated with a removal of a previously stored memory from the cache set of the cache memory in response to the storing of the data at the cache set of the plurality of cache sets of the cache memory when the cache set is full.

15. The method of claim 10 , further comprising:

storing the hash value of the memory address with the memory at the cache set of the plurality of cache sets; and

storing an identification of the first hash function with the hash value and the data at the cache set of the plurality of cache sets.

16. The method of claim 15 , wherein the hash value of the memory address, the data, and the identification of the first hash function are stored in a single way of the cache set.

17. The method of claim 16 , wherein the method further comprises:

in response to an eviction of the data stored in the single way of the cache set, calculating the memory address of the data based on the hash value, an identification of the cache set storing the data, and the identification of the first hash function.

18. The method of claim 10 , wherein the use of the second hash function distributes memory among the cache sets of the cache memory differently than the use of the first hash function.

19. An integrated circuit comprising:

a processor core; and

a hash function selection module associated with the processor core and to:

receive data and a memory address associated with the data;

calculate a hash value of the memory address by using a first hash function;

store the data at a cache set of a plurality of cache sets of a cache memory based on the hash value calculated from the first hash function;

determine whether the storing of the data at the cache set of the plurality of cache sets of the cache memory is associated with a conflict ratio of the cache memory exceeding a threshold ratio; and

in response to the conflict ratio exceeding the threshold ratio, calculate a second hash value of a second memory address associated with a second data by using a second hash function that is different than the first hash function.

20. The integrated circuit of claim 19 , wherein the hash function selection module is further to:

in response to the conflict ratio not exceeding the threshold ratio, calculate the second hash value of the second memory address associated with the second data by using the same first hash function.

21. The integrated circuit of claim 19 , wherein the hash function selection module is further to:

identify the cache set of the plurality of cache sets based on a portion of the hash value calculated from the first hash function.

22. The integrated circuit of claim 19 , wherein the conflict ratio is associated with a rate of eviction for memory previously stored in the cache memory, and wherein an eviction corresponding to the rate of eviction is associated with a removal of a previously stored memory from the cache set of the cache memory in response to the storing of the data at the cache set of the plurality of cache sets of the cache memory when the cache set is full.

23. The integrated circuit of claim 19 , wherein the hash selection module is further to:

store the hash value of the memory address with the memory at the cache set of the plurality of cache sets;

store an identification of the first hash function with the hash value and the data at the cache set of the plurality of cache sets, wherein the hash value of the memory address, the data, and the identification of the first hash function are stored in a single way of the cache set; and

in response to an eviction of the data stored in the single way of the cache set, calculating the memory address of the data based on the hash value, an identification of the cache set storing the data, and the identification of the first hash function.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 1, 2015
From: BERNAT, FRANCESC GUIM; GONZALEZ, ALEJANDRO DURAN
To: INTEL CORPORATION
Reel/Frame 035547/0585 →
Continuity (1)
Related Publication 20160321187A1 · Nov 3, 2016