<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Questions about cache line mapping in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Questions-about-cache-line-mapping/m-p/901528#M4259</link>
    <description>Hi,all.At present,I am trying to do some modification of the Linux memory
management
based on the Core Due processor.As I know, each physical memory page
will be assigned to some certain cache lines on L2 cache(suppose there is no L3 cache).So, in my
work, I'd like to do some modification of the Linux memory management
so that the OS will partition the memory according to the mapping
between L2 cache and memory.
&lt;BR /&gt;&lt;BR /&gt;So,I'd like to understand that in the IA-32 Arch,when paging is uesed,how the L2 cache map the physical memory address into the cache line,especially,the detailed address mapping procedure.&lt;BR /&gt;&lt;BR /&gt;I have read the document Intel 64
and IA-32 Architectures Software Developer's Manuals Volume
3A,especially the CHAPTER 3 PROTECTED-MODE MEMORY MANAGEMENT and CHAPER
10 MEMORY CACHE CONTROL,and scan the other chapters and other manuals
at the same location &lt;A href="http://developer.intel.com/products/processor/manuals/index.htm" target="_blank"&gt;http://developer.intel.com/products/processor/manuals/index.htm&lt;/A&gt;.But,unluckily,by now I haven't found the items that give the relative
specific explanations.&lt;BR /&gt;
&lt;BR /&gt;Do these documents explain the mapping methods between L2
cache and memory? Or will other
literatures give me an answer?&lt;BR /&gt;&lt;BR /&gt;Thanks a lot.&lt;BR /&gt;</description>
    <pubDate>Wed, 20 Aug 2008 07:00:43 GMT</pubDate>
    <dc:creator>zhangyihere</dc:creator>
    <dc:date>2008-08-20T07:00:43Z</dc:date>
    <item>
      <title>Questions about cache line mapping</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Questions-about-cache-line-mapping/m-p/901528#M4259</link>
      <description>Hi,all.At present,I am trying to do some modification of the Linux memory
management
based on the Core Due processor.As I know, each physical memory page
will be assigned to some certain cache lines on L2 cache(suppose there is no L3 cache).So, in my
work, I'd like to do some modification of the Linux memory management
so that the OS will partition the memory according to the mapping
between L2 cache and memory.
&lt;BR /&gt;&lt;BR /&gt;So,I'd like to understand that in the IA-32 Arch,when paging is uesed,how the L2 cache map the physical memory address into the cache line,especially,the detailed address mapping procedure.&lt;BR /&gt;&lt;BR /&gt;I have read the document Intel 64
and IA-32 Architectures Software Developer's Manuals Volume
3A,especially the CHAPTER 3 PROTECTED-MODE MEMORY MANAGEMENT and CHAPER
10 MEMORY CACHE CONTROL,and scan the other chapters and other manuals
at the same location &lt;A href="http://developer.intel.com/products/processor/manuals/index.htm" target="_blank"&gt;http://developer.intel.com/products/processor/manuals/index.htm&lt;/A&gt;.But,unluckily,by now I haven't found the items that give the relative
specific explanations.&lt;BR /&gt;
&lt;BR /&gt;Do these documents explain the mapping methods between L2
cache and memory? Or will other
literatures give me an answer?&lt;BR /&gt;&lt;BR /&gt;Thanks a lot.&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Aug 2008 07:00:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Questions-about-cache-line-mapping/m-p/901528#M4259</guid>
      <dc:creator>zhangyihere</dc:creator>
      <dc:date>2008-08-20T07:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Questions about cache line mapping</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Questions-about-cache-line-mapping/m-p/901529#M4260</link>
      <description>You suggest you'd lile the OS to partiton the memory according to the mapping between L2 cache and memory. Which L2 cache? If you consider any modern multi-socketed processor system, each socket will have its own L2 cache. Intel Architecture uses set-associative caches (as opposed to full-associative or direct-mapped, see &lt;A href="http://en.wikipedia.org/wiki/CPU_cache"&gt;CPU caches&lt;/A&gt;) that tend to scatter the mapping from cache across the virtual address space, and each L2 continues to change its mapping on demand. Tracking that varying map in the CPU that is changing it seems to me to be an exercise in frustration, but perhaps I'm missing your point? What is it that you hope to gain?</description>
      <pubDate>Tue, 26 Aug 2008 16:36:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Questions-about-cache-line-mapping/m-p/901529#M4260</guid>
      <dc:creator>robert-reed</dc:creator>
      <dc:date>2008-08-26T16:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Questions about cache line mapping</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Questions-about-cache-line-mapping/m-p/901530#M4261</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;IMG src="https://community.intel.com/file/6745" /&gt; &lt;STRONG&gt;zhangyihere:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;So,I'd like to understand that in the IA-32 Arch,when paging is uesed,how the L2 cache map the physical memory address into the cache line,especially,the detailed address mapping procedure.&lt;BR /&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;I think that the procedure is something like:&lt;BR /&gt;X - linear address of memory location&lt;BR /&gt;C - cache line size&lt;BR /&gt;P - number of partitions&lt;BR /&gt;
S - number of sets&lt;BR /&gt;&lt;BR /&gt;Y = X / C // strip lsb&lt;BR /&gt;Z = Y % P // calculate partition number&lt;BR /&gt;&lt;BR /&gt;2 memory locations with equal Z will conflict in cache.&lt;BR /&gt;And you can store up to S conflicting memory locations in cache simultaneously. If you have more than S memory locations with the same Z, than some of then will be evicted from cache.&lt;BR /&gt;&lt;BR /&gt;C, P and S is different for every cache level (L1, L2, L3).&lt;BR /&gt;You can determine C, P and S parameters via CPUID instruction in the deterministic cache parameter leaf.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Aug 2008 00:32:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Questions-about-cache-line-mapping/m-p/901530#M4261</guid>
      <dc:creator>Dmitry_Vyukov</dc:creator>
      <dc:date>2008-08-29T00:32:28Z</dc:date>
    </item>
  </channel>
</rss>

