简体   繁体   中英

Memory Coalescing with Physical address or Virtual address?

I studied some papers and books regarding the memory coalescing, however, I am still confused about whether memory requests with Virtual address will be coalesced, or the memory requests with Physical address will be coalesced?

As the memory coalescing intend to reduce the memory access to the memory devices, subsequently decrease the latency. And this process is normally implemented by MMU(memory management unit). But I didn't find any clear assertion that says it coalesces the memory requests with a virtual or physical address. But considering its purpose, the virtual addresses may not be adjacent after translated to physical address. So, I guess the it refers to the physical address.

Is anyone familiar with this field? Thanks in advance!!!

In order to be coalesced the addresses must be locally close (read: next to each other 1 ) in the main memory , so they must be physical addresses.

However in most architectures continuous virtual addresses are also continuous physical addresses as long as no page boundary is crossed 2 .

When a page boundary is crossed there is no guarantee that the physical addresses are continuous or even that the hardware supports the coalescing.

While each architecture is unique and in that sense there is no general answer to your question, memory coalescing is a feature of the unit responsible to communicate with memory. Thus it happens at a lower level than the MMU operations and it is transparent to with respect to them.


1 Different memory architectures have different concept of "subsequent" or "close" addresses.

2 In system with pages of size 4KiB and a thread accessing 0ffeh , 0fffh , 1000h and 1001h crosses a page boundary between 0fffh and 1000h as these two addresses belong to different pages. However 00feh , 00ffh , 0100h , 0101h are always continuous, no matter the mapping.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM