Write buffer

From Wikipedia, the free encyclopedia

A write buffer is a type of data buffer.

In a CPU cache, a write buffer can be used to hold data being written back from the cache to main memory. This is a variation of write-through caching called buffered write-through.

Use of a write buffer in this manner frees the cache to service read requests while the write is taking place. It is especially useful for very slow main memory in that subsequent reads are able to proceed without waiting for long main memory latency. When the write buffer is full (i.e. all buffer entries are occupied), subsequent writes still have to wait until some slots are freed. To further mitigate this stall, one optimization called write buffer merge is proposed. Write buffer merge combines writes that have consecutive destination addresses into one buffer entry. Otherwise, they would occupy separate entries which increases the chance of pipeline stall.

Sometimes the terminology victim buffer is also called write buffer. Victim buffer is a buffer that stores dirty evicted lines in write-back caches (note that write-through caches don't write the evicted cache lines back) before they get written back to the higher level memory. Besides reducing pipeline stall by not waiting for dirty lines to write back as the original write buffer does, victim buffer also serves as a temporary backup storage when subsequent cache accesses exhibit locality, requesting those recently evicted lines, which are still in the victim buffer.

See also


This article is issued from Wikipedia. The text is available under the Creative Commons Attribution/Share Alike; additional terms may apply for the media files.