Enabling huge pages #630
Replies: 1 comment 2 replies
-
|
Page size at the top of the config represents the page size, while pte page size represents the size of the page allocated for each page table page (I think, haven't looked at this portiom of the code for a bit). You probably don't want to have that set very large, or you are going to allocate an excessive amount of memory for your page tables, which is probably why you are receiving that error (if an address exceeds the maximum address extent of 64-bits, I think vmem calculates the maximum vmem address bits at some point. If that comes out to over 64 bits, it triggers the error). Try setting the pte_page_size to 4kib, while keeping the page size at 2MiB and page table levels to 4. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all!
I'm new to ChampSim, but trying to use it to simulate a workload that I gathered. I realized that my workload uses exclusively huge (2MB) pages to reduce TLB misses, so I tried to enable huge pages in the ChampSim config to get a more accurate simulation. However, I ran into a few confusing options:
First, I found
page_sizeat the top of the config file, which I tried setting to 2097152. However, I then got the following issue when running champsim:I then looked further down and also found the virtual_memory section of the config, which also has the
pte_page_sizeparameter. However, I'm not sure how this is supposed to differ from the otherpage_sizeargument. If I try to set this to 2MiB as well, I get an immediate assertion failure:It seems like this is an issue while creating
next_pte_pageinside of vmem.cc, but I'm not sure exactly why this is calculated the way it is:next_pte_page(champsim::dynamic_extent{champsim::data::bits{LOG2_PAGE_SIZE}, champsim::data::bits{champsim::lg2(champsim::data::bytes{pte_page_size}.count())}}, 0)I'm pretty confused, and would really appreciate some clarification on what these two parameters mean and how they differ!
It also seems like I may need to increase the amount of physical memory, and I am not sure which knob I should tune to make that happen (does higher # banks imply more memory total?).
Finally, I also see the option
num_levels, which is set to 5. I believe that I should set this to 4 for huge pages, because there is one fewer level of page table depth. Unfortunately, this doesn't seem to help with the issues above. I also would like to know if I should lowerminor_fault_penaltyby 20% because of the lowerednum_levels, or if the lowering ofnum_levelswill internally decrease the page walker latency.Any advice is much appreciated! Thank you for maintaining a great project.
Beta Was this translation helpful? Give feedback.
All reactions