# US 2011/0213926 A1 · Methods for determining alias offset of a cache memory

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

- Number: US 2011/0213926 A1
- Document ID: US20110213926A1
- Status: Published application
- Kind: A1
- Application number: 12/714,391
- Filed: 2010-02-26
- Published: 2011-09-01
- Earliest claimed: 2010-02-26
- Assignees: Red Hat, Inc.
- Inventors: Douglas Ledford
- Web page: https://patentgrep.com/patent/US20110213926A1

## CPC

- G06F 12/0802: Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F 11/3037: {where the computing system component is a memory, e.g. virtual memory, cache (accessing, addressing or allocating within memory systems or architectures G06F12/00; checking stores for correct operation G11C29/00)}
- G06F 11/3055: {Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available (error or fault processing without redundancy G06F11/0703; error detection or correction by redundancy in data representation G06F11/08; error detection or correction of the data by redundancy in operations G06F11/14; error detection or correction by redundancy in hardware G06F11/16)}
- G06F 12/0223: {User address space allocation, e.g. contiguous or non contiguous base addressing}
- G06F 11/1076: {Parity data used in redundant arrays of independent storages, e.g. in RAID systems}
- G06F 2211/1009: Cache, i.e. caches used in RAID system with parity
- G06F 2212/262: configured as RAID
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A redundant array of independent disk (RAID) stack determines a first number of processor cycles to reload first data from a first memory address of a main memory into a processor of a data processing system. The RAID stack loads second data from a second memory address of the main memory into the processor, where the second memory address is configured to be an address offset from the first memory address. The RAID stack reloads the first data from the first memory address of the main memory and determines a second number of processor cycles to reload the first data from the first memory address of the main memory. An alias offset of a cache memory associated with the processor of the data processing system is determined based on the first number of processor cycles and the second number of processor cycle.

## Claims

### Claim 1

A computer-implemented method, comprising:
determining, by a redundant array of independent disk (RAID) stack, a first number of processor cycles to reload first data from a first memory address of a main memory into a processor of a data processing system;
loading, by the RAID stack, second data from a second memory address of the main memory into the processor, wherein the second memory address is configured to be an address offset from the first memory address;
reloading, by the RAID stack, the first data from the first memory address of the main memory;
determining, by the RAID stack, a second number of processor cycles to reload the first data from the first memory address of the main memory; and
determining an alias offset of a cache memory associated with the processor of the data processing system based on the first number of processor cycles and the second number of processor cycle, wherein the alias offset is used to load a parity block of RAID data during parity calculations of the RAID data.

### Claim 2 (depends on 1)

The method of claim 1, wherein the first data and second data are loaded from the main memory into a register of the processor and into a cache memory associated with the processor.

### Claim 3 (depends on 2)

The method of claim 2, wherein determining the first number of processor cycles to reload first data from the first memory address of the main memory comprises:
loading the first data from the first memory address of the main memory into a first register of the processor and an cache entry of the cache memory associated with the processor;
reloading the first data from the first memory address of the main memory into a second register of the processor; and
measuring the first number of processor cycles to reload the first data from the first memory address into the second register of the processor.

### Claim 4 (depends on 2)

The method of claim 2, further comprising:
incrementing the address offset by a predetermined incremental value; and
repeating operations of loading the second data from the second memory address, reloading the first data from the first memory address, determining a second number of processor cycle, and determining the alias offset.

### Claim 5 (depends on 4)

The method of claim 4, wherein the predetermined incremental value equals to 4 Kbytes.

### Claim 6 (depends on 4)

The method of claim 4, wherein determining the alias offset of the cache memory associated with the processor comprises:
comparing the second number of processor cycles with the first number of processor cycles; and
designating a value currently presented by the address offset as the alias offset of the cache memory associated with the processor if the second number of processor cycles is significantly larger than the first number of processor cycles.

### Claim 7 (depends on 6)

The method of claim 6, wherein determining the first number of processor cycles and the second number of processor cycles comprise accessing, by the RAID stack via an application programming interface (API), a cycle counter of the processor which stores a number of processor cycles performed by the processor.

### Claim 8

A computer readable storage medium including instructions that, when executed by a processing system, cause the processing system to perform a method for parity calculations, the method comprising:
determining, by a redundant array of independent disk (RAID) stack, a first number of processor cycles to reload first data from a first memory address of a main memory into a processor of a data processing system;
loading, by the RAID stack, second data from a second memory address of the main memory into the processor, wherein the second memory address is configured to be an address offset from the first memory address;
reloading, by the RAID stack, the first data from the first memory address of the main memory;
determining, by the RAID stack, a second number of processor cycles to reload the first data from the first memory address of the main memory; and
determining an alias offset of a cache memory associated with the processor of the data processing system based on the first number of processor cycles and the second number of processor cycle, wherein the alias offset is used to load a parity block of RAID data during parity calculations of the RAID data.

### Claim 9 (depends on 8)

The computer readable storage medium of claim 8, wherein the first data and second data are loaded from the main memory into a register of the processor and into a cache memory associated with the processor.

### Claim 10 (depends on 9)

The computer readable storage medium of claim 9, wherein determining the first number of processor cycles to reload first data from the first memory address of the main memory comprises:
loading the first data from the first memory address of the main memory into a first register of the processor and an cache entry of the cache memory associated with the processor;
reloading the first data from the first memory address of the main memory into a second register of the processor; and
measuring the first number of processor cycles to reload the first data from the first memory address into the second register of the processor.

### Claim 11 (depends on 9)

The computer readable storage medium of claim 9, wherein the method further comprises:
incrementing the address offset by a predetermined incremental value; and
repeating operations of loading the second data from the second memory address, reloading the first data from the first memory address, determining a second number of processor cycle, and determining the alias offset.

### Claim 12 (depends on 11)

The computer readable storage medium of claim 11, wherein the predetermined incremental value equals to 4 Kbytes.

### Claim 13 (depends on 11)

The computer readable storage medium of claim 11, wherein determining the alias offset of the cache memory associated with the processor comprises:
comparing the second number of processor cycles with the first number of processor cycles; and
designating a value currently presented by the address offset as the alias offset of the cache memory associated with the processor if the second number of processor cycles is significantly larger than the first number of processor cycles.

### Claim 14 (depends on 13)

The computer readable storage medium of claim 13, wherein determining the first number of processor cycles and the second number of processor cycles comprise accessing, by the RAID stack via an application programming interface (API), a cycle counter of the processor which stores a number of processor cycles performed by the processor.

### Claim 15

A system, comprising:
a processor;
a main memory coupled to the processor; and
a redundant array of independent disk (RAID) stack executed from the main memory to cause the processor to
determine a first number of processor cycles to reload first data from a first memory address of the main memory into the processor;
load second data from a second memory address of the main memory into the processor, wherein the second memory address is configured to be an address offset from the first memory address;
reload the first data from the first memory address of the main memory;
determine a second number of processor cycles to reload the first data from the first memory address of the main memory; and
determine an alias offset of a cache memory associated with the processor of the data processing system based on the first number of processor cycles and the second number of processor cycle, wherein the alias offset is used to load a parity block of RAID data during parity calculations of the RAID data.

### Claim 16 (depends on 15)

The system of claim 15, wherein the first data and second data are loaded from the main memory into a register of the processor and into a cache memory associated with the processor.

### Claim 17 (depends on 16)

The system of claim 16, wherein to determine the first number of processor cycles to reload first data from the first memory address of the main memory, the RAID stack is configured to
load the first data from the first memory address of the main memory into a first register of the processor and an cache entry of the cache memory associated with the processor,
reload the first data from the first memory address of the main memory into a second register of the processor, and
measure the first number of processor cycles to reload the first data from the first memory address into the second register of the processor.

### Claim 18 (depends on 16)

The system of claim 16, wherein the RAID stack is further configured to incremente the address offset by a predetermined incremental value, and
repeat operations of loading the second data from the second memory address, reloading the first data from the first memory address, determining a second number of processor cycle, and determining the alias offset.

### Claim 19 (depends on 18)

The system of claim 18, wherein the predetermined incremental value equals to 4 Kbytes.

### Claim 20 (depends on 18)

The system of claim 18, wherein to determine the alias offset of the cache memory associated with the processor, the RAID stack is configured to
compare the second number of processor cycles with the first number of processor cycles, and
designate a value currently presented by the address offset as the alias offset of the cache memory associated with the processor if the second number of processor cycles is significantly larger than the first number of processor cycles.

### Claim 21 (depends on 20)

The system of claim 20, wherein to determine the first number of processor cycles and the second number of processor cycles, the RAID stack is configured to access via an application programming interface (API), a cycle counter of the processor which stores a number of processor cycles performed by the processor.
