Browse Prior Art Database

An Effective Method to Invalidate Virtually Indexed Physically Tagged Instruction Cache

IP.com Disclosure Number: IPCOM000125762D
Original Publication Date: 2005-Jun-16
Included in the Prior Art Database: 2005-Jun-16
Document File: 2 page(s) / 27K

Publishing Venue

IBM

Abstract

Virtually indexed caches have been used in microprocessors to allow address translation and cache look-up to occur in parallel. PowerPC* 405 in particular uses a virtually indexed physically tagged instruction cache (icache), whose consistency is maintained by operating systems (OS). In other words, when the memory is updated, the processor does not invalidate the icache corresponding to the memory . It is up to the operating system to issue instruction cache invalidation to purge stale instructions (from the cache).

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 59% of the total text.

Page 1 of 2

An Effective Method to Invalidate Virtually Indexed Physically Tagged Instruction Cache

Since the icache is indexed by the virtual address, and in today's general purpose operating systems, there are typically multiple virtual pages (sharing) mapping to a physical page, thus it's possible to have multiple cache-lines containing content from the same (physical) address, so called cache synonym phenomenon. As a result, when invalidating icache of a specific page, operating systems needs to cover all possible cache indices.

If the OS keeps a reversed page mapping, i.e., for each physical page, it keeps a list of all virtual pages mapping to the physical page, the reversed page mapping may be used to invalidate all cache-lines of synonym. However the reversed mapping is not necessarilypresent in operating systems. Moreover, for the purpose of invalidating cache synonyms, it is an over-kill. Below we describe a simple and effective mechanism that is guaranteed to invalidate all synonymic cache-lines using the data structure and services readily available in every operating system.

num_synocache = the number of cache-lines of synonym.

va_start = beginning of the virtual address range reserved (page aligned)

va_end = end of the virtual address range reserved (page aligned)

At system initialization:
1) kernel requests a small virtual address range with size of page_size * num_synocache
2) for (vaddr = va_start; vaddr < va_end; vaddr += page_size) pte_clear (vaddr)

K ernel...