-
Notifications
You must be signed in to change notification settings - Fork 0
apanwariisc/custom
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repository contains two simple c programs written to observe TLB behavior and the impact of huge pages on x86 processors. Both the programs start with allocating two buffers of 1GB each but references them in different manners. sequential.c: Iterate over the buffers touching 1 byte from each. An iteration picks one buffer first and traverses it touching 1 byte at 4KB jumps before moving to the second buffer. Successive memory references are expected to be 4KB apart generating TLB pressure. random.c: Iterate over the buffers touching one byte from each. Unlike sequential, traverses both the buffers at the same time. As a result, successive memory references are expected to be 1GB apart. How to compile: run "make" to compile. "make clean" to clean. How to run: Both the programs expect two arguments from the command line - 1. Access mode 2. The number of iterations to be performed. Access Modes: This argument influences how the buffers will be accessed. Following modes are supported - 0 - READ_ONLY - self-explanatory 1 - WRITE_ONLY - self-explanatory 2 - READ_WRITE - Every byte being touched is read first and then written. 3 - WRITE_READ - Every byte being touched is written first and then read. Example run- ./sequential 0 100000 ./random 1 100000
About
Personal Testing
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published