GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - heechul/palloc: DRAM Bank-Aware Kernel Memory Allocator

BranchesTags
Open more actions menu

Latest commit

 

History

123 Commits
123 Commits

Folders and files

NameName
Last commit message
Last commit date
Makefile
Makefile
 
 
README-map-detector.md
README-map-detector.md
 
 
README-old.md
README-old.md
 
 
README.md
README.md
 
 
cache_attack.cc
cache_attack.cc
 
 
detect-mc-mapping-safe.sh
detect-mc-mapping-safe.sh
 
 
detect-mc-mapping-xor.sh
detect-mc-mapping-xor.sh
 
 
detect-mc-mapping.sh
detect-mc-mapping.sh
 
 
gen_combination.py
gen_combination.py
 
 
mc-mapping-pagemap.c
mc-mapping-pagemap.c
 
 
mc-mapping.c
mc-mapping.c
 
 
palloc-3.10.patch
palloc-3.10.patch
 
 
palloc-3.13.patch
palloc-3.13.patch
 
 
palloc-3.15.patch
palloc-3.15.patch
 
 
palloc-3.6.patch
palloc-3.6.patch
 
 
palloc-3.8.patch
palloc-3.8.patch
 
 
palloc-4.14.patch
palloc-4.14.patch
 
 
palloc-4.4.patch
palloc-4.4.patch
 
 
palloc-4.9.patch
palloc-4.9.patch
 
 
palloc-5.10.74.patch
palloc-5.10.74.patch
 
 
palloc-5.15.patch
palloc-5.15.patch
 
 
palloc-5.3.patch
palloc-5.3.patch
 
 
palloc-5.4.83.patch
palloc-5.4.83.patch
 
 
palloc-6.11.patch
palloc-6.11.patch
 
 
palloc-6.13.patch
palloc-6.13.patch
 
 
palloc-6.6.patch
palloc-6.6.patch
 
 
palloc-6.8.patch
palloc-6.8.patch
 
 
palloc_xormap-6.11.patch
palloc_xormap-6.11.patch
 
 
palloc_xormap-6.12.patch
palloc_xormap-6.12.patch
 
 
palloc_xormap-6.14.patch
palloc_xormap-6.14.patch
 
 

Repository files navigation

PALLOC

PALLOC is a kernel-level memory allocator that exploits page-based virtual-to-physical memory translation to selectively allocate memory pages of each application to the desired DRAM banks. The goal of PALLOC is to control applications' memory locations in a way to minimize memory performance unpredictability in multicore systems by eliminating bank sharing among applications executing in parallel. PALLOC is a software based solution, which is fully compatible with existing COTS hardware platforms and transparent to applications (i.e., no need to modify application code.)

Note that these instructions apply to new palloc_xormap_ variants. For older palloc patches, see README-old.md.

Source code

You can use one of the prepared patches for different Linux kernel versions.

To build the kernel with PALLOC enabled, the following option must be enabled.

CONFIG_CGROUP_PALLOC=y

Detecting DRAM bank bits (for DRAM bank partitioning)

See drama-pp

For cache partitioning, just use the cache set bits instead of DRAM bank bits.

Usage

  • Set phsyical address to DRAM bank mapping functions (map.txt output from drama-pp)
    • Direct address maps (e.g., Raspberry Pi 4)
     # cat > map.txt
     12
     13
     14
     # cat map.txt > /sys/kernel/debug/palloc/control
     --> select bit 12, 13, 14. (total banks: 2^3 = 8)
    
    • XOR address maps (e.g., Intel Skylake)
     # cat > map.txt
     14 18
     15 19
     16 20
     17 21
     8 9 12 13 14 15
     # cat map.txt > /sys/kernel/debug/palloc/control
     --> select (14 ^ 18), (15 ^ 19), (16 ^ 20), and (17 ^ 21) and (8 ^ 9 ^ 12 ^ 13 ^ 14 ^ 15) (total bins: 2^5 = 32)
    
  • CGROUP partition setting
     # cd /sys/fs/cgroup/palloc
     # mkdir part1
     # cd part1
     # echo 0-3 > palloc.bins
     --> bin 0,1,2,3 are assigned to part1 CGROUP.
     # echo $$ > tasks
     --> when you enable PALLOC, all processes invoked from the shell use pages from the bins 0, 1, 2, or 3.  
    
  • Enable PALLOC
     # echo enable > /sys/kernel/debug/palloc/control
     --> enable palloc (owise the default buddy allocator will be used)
    
  • Other options
     # echo 1 > /sys/kernel/debug/palloc/debug_level  
     --> enable debug messsages visible through /sys/kernel/debug/tracing/trace.
     # echo 4 > /sys/kernel/debug/palloc/alloc_balance
     --> wait until at least 4 different colors are in the color cache. 
     # echo never > /sys/kernel/mm/transparent_hugepage/enabled
     --> palloc doesn't work with transparent huge page. please disable this.
    

Papers

  • Heechul Yun, Renato, Zheng-Pei Wu, Rodolfo Pellizzoni. "PALLOC: DRAM Bank-Aware Memory Allocator for Performance Isolation on Multicore Platforms," IEEE Intl. Conference on Real-Time and Embedded Technology and Applications Symposium (RTAS), 2014. (pdf, ppt)

About

DRAM Bank-Aware Kernel Memory Allocator

Resources

Readme
Activity

Stars

48 stars

Watchers

13 watching

Forks

26 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.