# US 8,751,745 B2 · Method for concurrent flush of L1 and L2 caches

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

- Number: US 8,751,745 B2
- Document ID: US8751745B2
- Status: Granted
- Kind: B2
- Application number: 12/854,658
- Filed: 2010-08-11
- Published: 2012-02-16
- Granted: 2014-06-10
- Earliest claimed: 2010-08-11
- Assignees: Advanced Micro Devices, Inc.
- Applicants: Robert Krick; David Kaplan
- Inventors: Robert Krick; David Kaplan
- Web page: https://patentgrep.com/patent/US8751745B2

## CPC

- G06F 12/0891: using clearing, invalidating or resetting means
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present invention provides a method and apparatus for use with a hierarchical cache system. The method may include concurrently flushing one or more first caches and a second cache of a multi-level cache. Each first cache is smaller and at a lower level in the multi-level cache than the second level cache.

## Claims

### Claim 1

A method, comprising:
concurrently flushing at least one first cache and a second cache of a multi-level cache of a processor, wherein each first cache is smaller and at a lower level in the multi-level cache than the second cache, and wherein concurrently flushing comprises:
flushing a single way of the second cache using hardware in response to a signal provided by microcode, wherein the second cache includes N ways; and
flushing a number of lines of said at least one first cache using the microcode, wherein the number corresponds to 1/N of the lines.

### Claim 2 (depends on 1)

The method of claim 1, wherein concurrently flushing said at least one first cache and the second cache comprises flushing said at least one first level cache using at least one of microcode or hardware and flushing the second cache using at least one of microcode or hardware.

### Claim 3 (depends on 1)

The method of claim 1, wherein concurrently flushing said at least one first cache and the second cache comprises concurrently flushing a first portion of said at least one first cache and a second portion of the second cache.

### Claim 4 (depends on 1)

The method of claim 1, comprising iteratively repeating concurrent flushing a single way of the second cache and the number of the lines of said at least one first cache until said at least one first cache and the second cache are completely flushed.

### Claim 5 (depends on 4)

The method of claim 4, comprising determining that an iteration of said concurrent flushing is complete by polling the hardware used to flush the second cache using the microcode.

### Claim 6 (depends on 4)

The method of claim 4, comprising using the microcode to determine whether an interrupt is pending after each iteration and stopping said concurrent flushing to service pending interrupts.

### Claim 7

A multi-level cache, comprising:
at least one first cache and a second cache, wherein each first cache is smaller and at a lower level in the multi-level cache than the second cache, and wherein the second cache includes N ways; and
a cache controller configured to control concurrent flushing of said at least one first cache and the second cache, wherein the cache controller is to control the concurrent flushing to flush only those ways of said at least one first cache and said second cache that include valid data, and wherein the cache controller is to control concurrent flushing by:
providing a signal to hardware to initiate flushing a selected portion or combination of ways of the second cache; and
flushing 1/N of lines of said at least one first cache using microcode.

### Claim 8 (depends on 7)

The multi-level cache of claim 7, wherein the cache controller is configured to select a first portion of said at least one first cache and a second portion of the second cache so that the first portion and the second portion can be flushed concurrently.

### Claim 9 (depends on 8)

The multi-level cache of claim 8, wherein the second cache includes N ways; and wherein the cache controller is configured to:
provide a signal to the hardware to initiate flushing a selected portion or combination of ways of the second cache; and
flush approximately 1/N of the lines of said at least one first cache using the microcode.

### Claim 10 (depends on 9)

The multi-level cache of claim 9, wherein the cache controller is configured to iteratively repeat concurrent flushing of the first portion and the second portion until said at least one first cache and the second cache are completely flushed.

### Claim 11 (depends on 10)

The multi-level cache of claim 10, wherein the cache controller is configured to determine that an iteration of said concurrent flushing of the first portion and a second portion is complete by polling the hardware used to flush the second cache using the microcode.

### Claim 12 (depends on 10)

The multi-level cache of claim 10, wherein the cache controller is configured to use the microcode to determine whether an interrupt is pending after each iteration and to stop said concurrent flushing so that pending interrupts can be serviced.
