IP Library › Granted Patent US 9,977,609
Granted Patent B2
US 9,977,609 · App. 15/063,186 · Granted May 22, 2018

Efficient accesses of data structures using processing near memory

Inventors: Nuwan S. Jayasena (Sunnyvale, CA); Dong Ping Zhang (San Jose, CA); Paula Aguilera Diez (San Jose, CA)
Assignee: Advanced Micro Devices, Inc.
G06F3/0613G06F3/0658G06F3/0673G06F12/023G06F12/10
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,977,609
App. No.
15/063,186
Granted
May 22, 2018
Kind
B2
Abstract

Systems, apparatuses, and methods for implementing efficient queues and other data structures. A queue may be shared among multiple processors and/or threads without using explicit software atomic instructions to coordinate access to the queue. System software may allocate an atomic queue and corresponding queue metadata in system memory and return, to the requesting thread, a handle referencing the queue metadata. Any number of threads may utilize the handle for accessing the atomic queue. The logic for ensuring the atomicity of accesses to the atomic queue may reside in a management unit in the memory controller coupled to the memory where the atomic queue is allocated.

Claims (58)

1. A system comprising:

one or more memory devices;

one or more processors; and

one or more memory controllers comprising:

a first interface configured to be coupled to the one or more processors;

a second interface configured to be coupled to the one or more memory devices; and

control logic;

wherein responsive to receiving a first memory access operation from a first processor via the first interface, the control logic is configured to:

in response to determining the first memory access operation does not target an atomic data structure, execute the first memory access operation;

in response to determining the first memory access operation targets an atomic data structure:

convert the first memory access operation into at least a first access and a second access;

perform the first access to metadata via the second interface, wherein the metadata corresponds to a data structure referenced by the first memory access operation; and

perform the second access to the data structure via the second interface, wherein the second access is specified by the first memory access operation.

2. The system as recited in claim 1 , wherein determining the first memory access operation targets the atomic data structure comprises performing a lookup of a table of active or valid atomic data structures.

3. The system as recited in claim 1 , wherein the metadata comprises at least one of: a head pointer, tail pointer, a count of a number of items in the data structure, a payload start pointer, and a payload end pointer.

4. The system as recited in claim 1 , the one or more processors are configured to:

allocate first memory locations for the data structure in the one or more memory devices responsive to detecting a request to allocate the data structure;

allocate second memory locations for metadata in the one or more memory devices;

initialize the metadata; and

return, to a requesting thread, a handle to the second memory locations.

5. The system as recited in claim 4 , wherein the one or more processors are configured to allocate the first memory locations and second memory locations in a non-cacheable region of system memory address space.

6. The system as recited in claim 1 , wherein each of the one or more memory controllers are included within the one or more memory devices.

7. The system as recited in claim 4 , wherein the data structure is a queue, and wherein the first memory access operation identifies a first handle to the metadata of the data structure.

8. A memory controller comprising:

a first interface configured to be coupled to one or more processors;

a second interface configured to be coupled to one or more memory devices; and

control logic;

wherein responsive to receiving a first memory access operation from a first processor via the first interface, the control logic is configured to:

in response to determining the first memory access operation does not target an atomic data structure, execute the first memory access operation;

in response to determining the first memory access operation targets an atomic data structure:

convert the first memory access operation into at least a first access and a second access;

perform the first access to metadata via the second interface, wherein the metadata corresponds to a data structure referenced by the first memory access operation; and

perform the second access to the data structure via the second interface, wherein the second access is specified by the first memory access operation.

9. The memory controller as recited in claim 8 , wherein determining the first memory access operation targets the atomic data structure comprises performing a lookup of a table of active or valid atomic data structures.

10. The memory controller as recited in claim 8 , wherein the metadata comprises at least one of a head pointer, tail pointer, a count of a number of items in the data structure, a payload start pointer, and a payload end pointer.

11. The memory controller as recited in claim 8 , wherein the control logic is configured to determine a location of the data structure from the metadata.

12. The memory controller as recited in claim 8 , wherein prior to completing the first and second access, the memory controller is configured to:

receive a second operation from a second processor;

determine that the second operation references the data structure; and

prevent accesses, corresponding to the second operation, from being performed to the data structure until after the first and second access have been completed.

13. The memory controller as recited in claim 8 , wherein the memory controller comprises a plurality of memory channels, wherein the data structure and the metadata are allocated to span only a single memory channel, and wherein the data structure and the metadata are allocated in a non-cacheable region of system memory address space.

14. The memory controller as recited in claim 8 , wherein the data structure is a queue, and wherein the first operation identifies a first handle to metadata of the data structure.

15. A method comprising:

in response to receiving a first memory access operation from a first processor via a first interface:

in response to determining the first memory access operation does not target an atomic data structure, executing the first memory access operation;

in response to determining the first memory access operation targets an atomic data structure:

converting the first memory access operation into at least a first access and a second access;

performing the first access to metadata via a second interface responsive to receiving a first memory access operation from a first processor via the first interface, wherein the metadata corresponds to a data structure referenced by the first operation; and

performing the second access to the data structure via the second interface, wherein the second access is specified by the first memory access operation.

16. The method as recited in claim 15 , wherein determining the first memory access operation targets the atomic data structure comprises performing a lookup of a table of active or valid atomic data structures.

17. The method as recited in claim 15 , wherein the metadata comprises at least one of a head pointer, tail pointer, a count of a number of items in the data structure, a payload start pointer, and a payload end pointer.

18. The method as recited in claim 15 , wherein the method further comprising:

allocating first memory locations for the data structure in system memory responsive to detecting a request to allocate the data structure;

allocating second memory locations for the metadata in the one or more memory devices;

initializing the metadata; and

returning, to a requesting thread, a handle to the second memory locations.

19. The method as recited in claim 18 , further comprising allocating the first memory locations and second memory locations in a non-cacheable region of system memory address space.

20. The method as recited in claim 18 , further comprising allocating the first memory locations and second memory locations to span only a single memory channel.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 29, 2016
From: JAYASENA, NUWAN S.; ZHANG, DONG PING; DIEZ, PAULA AGUILERA
To: ADVANCED MICRO DEVICES, INC.
Reel/Frame 038127/0130 →
Continuity (1)
Related Publication 20170255397A1 · Sep 7, 2017