[compute/copy-on-write]: Add a new quiz about Transparent Huge Pages#220
[compute/copy-on-write]: Add a new quiz about Transparent Huge Pages#220robertmercea wants to merge 2 commits into
Conversation
- Change NUM_PAGES to 256 in the original code to avoid Transparent Huge Pages (THP) being triggered, allowing students to properly view the expected page fault numbers, as shown in the course material - Create a new quiz about THP, explaining the low number of page faults caused by the program, despite increasing the page count - Add the new quiz in config.yaml Signed-off-by: robertmercea <robertmercea@gmail.com>
There was a problem hiding this comment.
THP is legit, but not always enabled by default. You'd have to configure them in: /sys/kernel/mm/transparent_hugepage/hugepages-<size>/enabled.
For example, my configs are:
$ cat /sys/kernel/mm/transparent_hugepage/hugepages-2048kB/enabled
always inherit madvise [never]
Which means they're disabled. So I suggest you add instructions to enable THP of various sizes and then have students re-run the faults demo to see the differences. Also add this link, it explains how they affect the TLB: https://docs.kernel.org/admin-guide/mm/transhuge.html.
- Added details about how Transparent Huge Pages (THP) work in Linux - Added a simple guide on how to enable THP Signed-off-by: robertmercea <robertmercea@gmail.com>
5b564b6 to
7b8750e
Compare
|
I've added instructions to enable THP as requested. Further explanations about THP have been added in hopes of encouraging students to do the bonus task, or at least to have a better understanding of the concept. |
Prerequisite Checklist
Description of changes
NUM_PAGESto 256 in thefork-faultsguide to avoid Transparent Huge Pages (THP) being triggeredconfig.yaml