Write through virtual cache memory, alias addressing, and cache flushes
First Claim
1. In a computer system comprising a central processing unit (CPU) coupled to a cache memory and a main memory executing a plurality of processes, wherein cache hits/misses are based on virtual addresses and some of said virtual addresses are alias addresses to each other, a method for said CPU to update said cache and main memory that reduces cache flushings, said method comprising the steps of:
- receiving by said cache memory a write signal and a virtual address from said CPU;
determining by said cache memory if said virtual address results in a selected one of a write cache hit and a write cache miss based on said virtual address and mapping by said cache memory said virtual address to a physical address that identifies a memory location of a memory block of said main memory;
providing by said cache memory a first control signal to an internal cache memory data array instructing said internal cache memory data array to accept a data byte from said CPU if said virtual address results in said write cache hit, said data byte being dispatched by said CPU to said cache memory, said data byte being cached in a cache line of said cache memory upon acceptance by said cache memory, said cache line being identified by said virtual address and corresponding to said memory block;
providing by said cache memory said physical address and a second control signal to said main memory, said second control signal instructing said main memory to accept said data byte from said CPU and storing said data byte in said memory location, said data byte being also dispatched by said CPU to said main memory;
determining by said cache memory if said main memory location identified by said physical address is a non-cacheable memory location of a non-cacheable memory block of said main memory; and
waiting by said cache memory for the result of said non-cacheability determination, the result of said non-cacheability determination being available after the result of said cache hit/miss determination, then without detecting for alias addresses of said virtual address, conditionally flushing by said cache memory a cache line in which said memory block could have been cached if said virtual address results in said write cache miss and said memory location is not a non-cacheable memory location.
0 Assignments
0 Petitions
Accused Products
Abstract
In a computer system comprising a CPU, a cache memory and a main memory wherein the cache memory is virtually addressed, and some of the virtual addresses are alias address to each other, a cache memory controller comprising a cache control logic, a cache tag array, a memory management unit, and an alias detection logic is provided. The cache control logic skips flushing of a cache line if the cache line is corresponding to a memory block in a non-cacheable physical memory page, thereby avoiding unnecessary flushes and allowing the CPU to update the cache memory and the main memory using an improved write through and no write allocate approach that reduces cache flushes.
42 Citations
9 Claims
-
1. In a computer system comprising a central processing unit (CPU) coupled to a cache memory and a main memory executing a plurality of processes, wherein cache hits/misses are based on virtual addresses and some of said virtual addresses are alias addresses to each other, a method for said CPU to update said cache and main memory that reduces cache flushings, said method comprising the steps of:
-
receiving by said cache memory a write signal and a virtual address from said CPU; determining by said cache memory if said virtual address results in a selected one of a write cache hit and a write cache miss based on said virtual address and mapping by said cache memory said virtual address to a physical address that identifies a memory location of a memory block of said main memory; providing by said cache memory a first control signal to an internal cache memory data array instructing said internal cache memory data array to accept a data byte from said CPU if said virtual address results in said write cache hit, said data byte being dispatched by said CPU to said cache memory, said data byte being cached in a cache line of said cache memory upon acceptance by said cache memory, said cache line being identified by said virtual address and corresponding to said memory block; providing by said cache memory said physical address and a second control signal to said main memory, said second control signal instructing said main memory to accept said data byte from said CPU and storing said data byte in said memory location, said data byte being also dispatched by said CPU to said main memory; determining by said cache memory if said main memory location identified by said physical address is a non-cacheable memory location of a non-cacheable memory block of said main memory; and waiting by said cache memory for the result of said non-cacheability determination, the result of said non-cacheability determination being available after the result of said cache hit/miss determination, then without detecting for alias addresses of said virtual address, conditionally flushing by said cache memory a cache line in which said memory block could have been cached if said virtual address results in said write cache miss and said memory location is not a non-cacheable memory location. - View Dependent Claims (2, 3)
-
-
4. In a computer system comprising a central processing unit (CPU) coupled to a cache memory and a main memory executing a plurality of processes, wherein cache hits/misses are based on virtual addresses and some of said virtual addresses are alias addresses to each other, a cache memory controller for said CPU to update said cache and main memory that reduces cache flushings, said cache memory controller comprising:
-
a cache tag array for storing a plurality of cache tags identifying a plurality of memory blocks of said main memory currently cached in a plurality of cache lines of said cache memory corresponding to said cache tags; a memory management unit for mapping virtual addresses to physical addresses that identify memory locations of memory blocks of said main memory, and tracking non-cacheable physical memory pages of said main memory, said non-cacheable physical memory pages comprising non-cacheable memory blocks; and a cache control logic coupled to said CPU, said cache tag array, and said memory management unit for receiving a write signal and a virtual address from said CPU, determining if said virtual address results in a selected one of a write cache hit and a write cache miss based on said virtual address and using said cache tag array, mapping said virtual address to a physical address that identifies a memory location of said main memory using said memory management unit, providing a first control signal to said cache memory instructing said cache memory to accept a data byte from said CPU if said virtual address results in said write cache hit, providing said physical address and a second write control signal to said main memory instructing said main memory to accept said data byte from said CPU and storing said data byte in said memory location, determining if said main memory location identified by said physical address is a non-cacheable memory location using also said memory management unit, and waiting for the result of said non-cacheability determination, the result of said non-cacheability determination being available after the result of said cache hit/miss determination, then without detecting for alias addresses of said virtual address, conditionally flushing a cache line in which said memory block could have been cached if said virtual address results in said write cache miss and said memory location is not a non-cacheable memory location; said data byte being dispatched by said CPU to said main memory and said cache memory simultaneously, said data byte being cached in a cache line of said cache memory upon acceptance by said cache memory, said cache line being identified by said virtual address and corresponding to said memory block. - View Dependent Claims (5, 6, 7)
-
- 8. An improved computer system comprising a central processing unit (CPU) coupled to a cache memory and a main memory executing a plurality of processes, wherein cache hits/misses are determined based on virtual addresses, some of said virtual addresses are alias addresses to each other, and cacheability of memory locations is determined as an integral part of virtual address to physical address translations, said improvement comprising an improved cache memory controller coupled to said CPU, said cache memory, and said main memory, that allows said CPU to update said cache and main memory with an improved write through with no write allocate approach that reduces cache flushes on write cache misses by waiting for the results of said cacheability determinations, the results of said cacheability determinations being available after the results of the corresponding cache hit/miss determinations, then without detecting for alias addresses of the virtual addresses, conditionally performing cache flushes for cache write misses only for cacheable memory locations.
Specification