# US 10,482,024 B2 · Private caching for thread local storage data access

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,482,024 B2
- Document ID: US10482024B2
- Status: Granted
- Kind: B2
- Application number: 15/655,711
- Filed: 2017-07-20
- Published: 2019-01-24
- Granted: 2019-11-19
- Earliest claimed: 2017-07-20
- Assignees: Alibaba Group Holding Limited
- Applicants: Alibaba Group Holding Limited
- Inventors: Xiaowei Jiang
- Web page: https://patentgrep.com/patent/US10482024B2

## CPC

- G06F 12/0888: using selective caching, e.g. bypass
- G06F 12/0811: with multilevel cache hierarchies
- G06F 12/084: with a shared cache
- G06F 12/0842: for multiprocessing or multitasking
- G06F 12/0846: Cache with multiple tag or data arrays being simultaneously accessible
- G06F 12/1009: using page tables, e.g. page table structures
- G06F 12/1027: using associative or pseudo-associative address translation means, e.g. translation look-aside buffer [TLB]
- G06F 2212/1021: Hit rate improvement
- G06F 2212/1024: Latency reduction
- G06F 2212/1028: Power efficiency
- G06F 2212/1041: Resource optimization
- G06F 2212/62: Details of cache specific to multiprocessor cache arrangements
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

A multi-core CPU includes a Last-Level Cache (LLC) interconnected with a plurality of cores. The LLC may include a shared portion and a private portion. The shared portion may be shared by the plurality of cores. The private portion may be connected to a first core of the plurality of cores and may be exclusively assigned to the first core. The first core may be configured to initiate a data access request to access data stored in the LLC and initiate a data access request to access data stored in the LLC. The first core may route the data access request to the private portion based on the determination that the data access request is the TLS type of access request and route the data access request to the shared portion based on the determination that the data access request is not the TLS type of access request.

## Claims

### Claim 1

A central processing unit (CPU), comprising:
a plurality of cores; and
a Last-Level Cache (LLC) interconnected with the plurality of cores, the LLC including a shared portion and a plurality of private portions that correspond to the plurality of cores, wherein:
the shared portion is shared by the plurality of cores,
a first private portion of the plurality of private portions is connected to a first core of the plurality of cores and is exclusively assigned to the first core, and
a second private portion of the plurality of private portions is connected to a second core of the plurality of cores and is exclusively assigned to the second core.

### Claim 2 (depends on 1)

The CPU of claim 1, wherein the first core is configured to:
initiate a data access request to access data stored in the LLC;
determine whether the data access request is a Thread Local Storage (TLS) type of access request based on an annotation associated with the data access request;
route the data access request to the first private portion based on the determination that the data access request is the TLS type of access request; and
route the data access request to the shared portion based on the determination that the data access request is not the TLS type of access request.

### Claim 3 (depends on 2)

The CPU of claim 2, wherein the annotation includes an instruction annotation associated with a load instruction or a store instruction.

### Claim 4 (depends on 2)

The CPU of claim 2, wherein the annotation includes a TLS hint bit of a page table entry or a TLS hint bit of a Translation Lookaside Buffer (TLB) entry.

### Claim 5 (depends on 2)

The CPU of claim 2, further comprising an LLC selector configured to select between the shared portion and the first private portion as a destination to route the data access request based on the annotation.

### Claim 6 (depends on 5)

The CPU of claim 5, wherein the LLC selector is configured to select the shared portion as the destination to route the data access request by applying a hashing function to an address portion of the data access request.

### Claim 7 (depends on 5)

The CPU of claim 5, wherein the LLC selector is configured to select the first private portion as the destination by choosing a local LLC slice of the first private portion as a target LLC slice to route the data access request.

### Claim 8 (depends on 1)

The CPU of claim 1, wherein at least one private portion of the plurality of private portions is configured to be flushed during a thread migration process or a job rescheduling process.

### Claim 9 (depends on 1)

The CPU of claim 1, comprising less than or equal to 64 cores.

### Claim 10 (depends on 1)

The CPU of claim 1, comprising more than 64 cores, and the CPU is configured to:
determine whether an address is a TLS address based on an identification in a tag portion of an LLC entry.

### Claim 11

A method, performed by a central processing unit (CPU) including a plurality of cores, of accessing data stored in a Last-Level Cache (LLC) interconnected with the plurality of cores, the method comprising:
initiating a data access request;
determining whether the data access request is a Thread Local Storage (TLS) type of access request based on an annotation associated with the data access request;
routing the data access request to a first private portion of the LLC in response to the determination that the data access request is the TLS type of access request, the LLC including a plurality of private portions that correspond to the plurality of cores, the first private portion of the plurality of private portions being connected to a first core and exclusively assigned to the first core, and a second private portion of the plurality of private portions being connected to a second core of the plurality of cores and is exclusively assigned to the second core; and
routing the data access request to a shared portion of the LLC when in response to the determination that the data access request is not the TLS type of access request, the shared portion being shared by the plurality of cores.

### Claim 12 (depends on 11)

The method of claim 11 wherein the annotation includes an instruction annotation associated with a load instruction or a store instruction.

### Claim 13 (depends on 11)

The method of claim 11, wherein the annotation includes a TLS hint bit of a page table entry or a TLS hint bit of a Translation Lookaside Buffer (TLB) entry.

### Claim 14 (depends on 11)

The method of claim 11, further comprising:
selecting, by an LLC selector of the CPU, between the shared portion and the first private portion as a destination to route the data access request based on the annotation.

### Claim 15 (depends on 14)

The method of claim 14, further comprising:
applying a hashing function to an address portion of the data access request to select the shared portion as the destination to route the data access request.

### Claim 16 (depends on 14)

The method of claim 14, further comprising:
choosing a local LLC slice of the first private portion as a target LLC slice to select the first private portion as the destination to route the data access request.

### Claim 17 (depends on 11)

The method of claim 11, further comprising:
flushing at least one private portion of the plurality of private portions during a thread migration process or a job rescheduling process.

### Claim 18 (depends on 11)

The method of claim 11, further comprising:
determining whether an address is a TLS address based on an identification in a tag portion of an LLC entry.

### Claim 19

A data processing system, comprising:
a memory storing data; and
a processor including a plurality of cores, wherein the processor is coupled to the memory through multiple levels of caches;
wherein the multiple levels of caches include a Last-Level Cache (LLC), the LLC including a shared portion and a plurality of private portions that correspond to the plurality of cores, wherein:
the shared portion is shared by the plurality of cores,
a first private portion of the plurality of private portions is connected to a first core of the plurality of cores and is exclusively assigned to the first core, and
a second private portion of the plurality of private portions is connected to a second core of the plurality of cores and is exclusively assigned to the second core.

### Claim 20 (depends on 19)

The data processing system of claim 19, wherein the first core is configured to:
initiate a data access request to access data stored in the LLC;
determine whether the data access request is a Thread Local Storage (TLS) type of access request based on an annotation associated with the data access request;
route the data access request to the first private portion based on the determination that the data access request is the TLS type of access request; and
route the data access request to the shared portion based on the determination that the data access request is not the TLS type of access request.

### Claim 21 (depends on 20)

The data processing system of claim 20, wherein the annotation includes an instruction annotation associated with a load instruction or a store instruction.

### Claim 22 (depends on 20)

The data processing system of claim 20, wherein the annotation includes a TLS hint bit of a page table entry or a TLS hint bit of a Translation Lookaside Buffer (TLB) entry.

### Claim 23 (depends on 20)

The data processing system of claim 20, wherein the processor further comprises an LLC selector configured to select between the shared portion and the first private portion as a destination to route the data access request based on the annotation.

### Claim 24 (depends on 23)

The data processing system of claim 23, wherein the LLC selector is configured to select the shared portion as the destination to route the data access request by applying a hashing function to an address portion of the data access request.

### Claim 25 (depends on 23)

The data processing system of claim 23, wherein the LLC selector is configured to select the first private portion as the destination by choosing a local LLC slice of the first private portion as a target LLC slice to route the data access request.

### Claim 26 (depends on 19)

The data processing system of claim 19, wherein at least one private portion of the plurality of private portions is configured to be flushed during a thread migration process or a job rescheduling process.
