- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I'm wondering, can clflush instruction flush any type of addresses in a cache line (logical, linear or physical address) or has to be only a linear address.
Thank you in advance for your help
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The description in Volume 2 "Instruction Set Reference" of the Intel Software Developer's Guide seems clear enough -- CLFLUSH takes a linear address as its argument and flushes the cache line containing that linear address from all levels of the memory hierarchy and from all caches in the system.
Inside the L1 cache, all aliased virtual to physical translations map to the same cache set (on current Intel processors) so there is no difference between evicting the linear address and the physical address. (This can be more complex with other processors.)
Outside of the L1 cache, all addresses used by the system are physical addresses, so it is the physical address that gets broadcast globally for eviction. If that cache line was loaded into a cache using a different virtual address, it will get evicted anyway, which may be unexpected. (Virtual address aliasing is frowned on for data, but it is heavily used for instructions in Address Space Layout Randomization.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you so much John.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page