IP Library › Granted Patent US 9,158,702
Granted Patent B2
US 9,158,702 · App. 13/730,507 · Granted Oct 13, 2015

Apparatus and method for implementing a scratchpad memory using priority hint

Inventors: Christopher J. Hughes (Santa Clara, CA); Daya Shankar Khudia (Ann Arbor, MI); Daehyun Kim (San Jose, CA); Jong Soo Park (Santa Clara, CA); Richard M. Yoo (Stanford, CA)
Assignee: INTEL CORPORATION
G06F12/1009G06F12/123G06F12/127G06F2212/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,158,702
App. No.
13/730,507
Granted
Oct 13, 2015
Kind
B2
Abstract

An apparatus and method for implementing a scratchpad memory within a cache using priority hints. For example, a method according to one embodiment comprises: providing a priority hint for a scratchpad memory implemented using a portion of a cache; determining a page replacement priority based on the priority hint; storing the page replacement priority in a page table entry (PTE) associated with the page; and using the page replacement priority to determine whether to evict one or more cache lines associated with the scratchpad memory from the cache.

Claims (35)

1. A method comprising:

providing a priority hint of a page for a scratchpad memory implemented using a portion of a cache;

determining a page replacement priority based on the priority hint;

storing the page replacement priority of the page in a page table entry (PTE) of a page table associated with the page; and

using the page replacement priority to determine whether to evict one or more cache lines associated with the scratchpad memory from the cache.

2. The method as in claim 1 wherein using the page replacement priority comprises combining the page replacement priority with per-line state information to determine whether to evict a cache line associated with the scratchpad memory.

3. The method as in claim 2 wherein the per-line state information comprises an indication as to how frequently or how recently each cache line has been used.

4. The method as in claim 2 wherein the per-line state information comprises an indication as to whether the cache line is a most recently used (MRU) or a least recently used (LRU) cache line.

5. The method as in claim 1 further comprising:

loading the page replacement priority from the PTE to a translation lookaside buffer (TLB); and

reading the page replacement priority from the TLB.

6. The method as in claim 1 wherein determining a page replacement priority further comprises combining the priority hint with one or more usage metrics associated with the page to arrive at the page replacement priority.

7. The method as in claim 1 wherein the priority hint is generated by a user application which uses the scratchpad memory.

8. The method as in claim 1 wherein the priority hint is generated using a system call to provide the priority hint to an operating system (OS).

9. The method as in claim 8 wherein the OS maintains the page table storing the PTE in memory.

10. The method as in claim 1 wherein the priority hint is provided with a memory allocation request to an operating system (OS).

11. A processor comprising:

a scratchpad memory to be implemented using a portion of a cache; and

cache line replacement logic using a page replacement priority of a page associated with the scratchpad memory to determine whether to evict one or more cache lines associated with the scratchpad memory from the cache, the page replacement priority of the page to be stored in a page table entry (PTE) of a page table, the page replacement priority determined based on a priority hint of the page.

12. The processor as in claim 11 wherein using the page replacement priority comprises combining the page replacement priority with per-line state information to determine whether to evict a cache line associated with the scratchpad memory.

13. The processor as in claim 12 wherein the per-line state information comprises an indication as to how frequently or how recently each cache line has been used.

14. The processor as in claim 12 wherein the per-line state information comprises an indication as to whether the cache line is a most recently used (MRU) or a least recently used (LRU) cache line.

15. The processor as in claim 11 further comprising:

a translation lookaside buffer (TLB) to store the page replacement priority; and

the cache line replacement logic to read the page replacement priority from the TLB.

16. The processor as in claim 11 further comprising program code to determine the page replacement priority by combining the priority hint with one or more usage metrics associated with the page to arrive at a page replacement priority.

17. The processor as in claim 11 wherein the priority hint is generated by a user application which uses the scratchpad memory.

18. The processor as in claim 11 wherein the priority hint is generated using a system call to provide the priority hint to an operating system (OS).

19. The processor as in claim 18 wherein the OS maintains the page table storing the PTE in memory.

20. The processor as in claim 11 wherein the priority hint is provided with a memory allocation request to an operating system (OS).

21. A system comprising:

a scratchpad memory to be implemented using a portion of a cache;

an application programming interface (API) to provide a priority hint of a page for the scratchpad memory;

an operating system (OS) to determine a page replacement priority of the page based on the priority hint and to store the page replacement priority in a page table entry (PTE) of a page table associated with the page; and

cache line replacement logic using the page replacement priority to determine whether to evict one or more cache lines associated with the scratchpad memory from the cache.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 31, 2014
From: HUGHES, CHRISTOPHER J.; KHUDIA, DAYA SHANKER; KIM, DAEHYUN; PARK, JONG SOO; YOO, RICHARD M.
To: INTEL CORPORATION
Reel/Frame 034607/0802 →
Continuity (1)
Related Publication 20140189247A1 · Jul 3, 2014