An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for...
Transcript of An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for...
![Page 1: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/1.jpg)
An Evolutionary Study of Linux
Memory Management for Fun and Profit
Jian Huang
Moinuddin K. Qureshi Karsten Schwan
![Page 2: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/2.jpg)
Virtual Memory: A Long History
2
DRAM Disk
Physical Hardware
![Page 3: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/3.jpg)
Virtual Memory: A Long History
Virtual Memory
(per process)
2
DRAM Disk
Physical Hardware
![Page 4: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/4.jpg)
Virtual Memory: A Long History
Virtual Memory
(per process)
2
DRAM Disk
Physical Hardware
![Page 5: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/5.jpg)
Virtual Memory: A Long History
Virtual Memory
(per process)
2
DRAM Disk
Physical Hardware
DevelopmentOS Core Component
+
![Page 6: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/6.jpg)
Virtual Memory: A Long History
Virtual Memory
(per process)
2
DRAM Disk
Physical Hardware
Pervasively UsedDevelopmentOS Core Component
+
![Page 7: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/7.jpg)
Why Memory Manager Study Matters?
3
Features & Functions
![Page 8: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/8.jpg)
Why Memory Manager Study Matters?
3
Features & Functions Hardware Support
![Page 9: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/9.jpg)
Why Memory Manager Study Matters?
3
Features & Functions Hardware Support System Reliability
![Page 10: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/10.jpg)
Why Memory Manager Study Matters?
3
Features & Functions Hardware Support System Reliability
Study on Memory Manager
![Page 11: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/11.jpg)
Why Memory Manager Study Matters?
3
Features & Functions Hardware Support System Reliability
Study on Memory Manager Building Better Memory Manager
![Page 12: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/12.jpg)
On the Study of Memory Management
4
Understanding the Linux Virtual Memory Manager[Mel Gorman, July 9, 2007]
![Page 13: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/13.jpg)
On the Study of Memory Management
4
Understanding the Linux Virtual Memory Manager[Mel Gorman, July 9, 2007]
Approach: Source code analysis, Linux 2.4, 2.6
![Page 14: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/14.jpg)
Milestone
On the Study of Memory Management
4
Understanding the Linux Virtual Memory Manager[Mel Gorman, July 9, 2007]
Approach: Source code analysis, Linux 2.4, 2.6
![Page 15: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/15.jpg)
Milestone
On the Study of Memory Management
4
Understanding the Linux Virtual Memory Manager[Mel Gorman, July 9, 2007]
Approach: Source code analysis, Linux 2.4, 2.6
Our Focus: Patch study, Linux 2.6 – 4.0
![Page 16: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/16.jpg)
Milestone
On the Study of Memory Management
4
Understanding the Linux Virtual Memory Manager[Mel Gorman, July 9, 2007]
Approach: Source code analysis, Linux 2.4, 2.6
Our Focus: Patch study, Linux 2.6 – 4.0
Pattern Memory Bug
+Optimization
+Semantic
+
![Page 17: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/17.jpg)
Preview of Our Findings
5
• Code changes are highly concentrated around the key functions
• 80% of patches 25% of its source code
• ......
![Page 18: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/18.jpg)
Preview of Our Findings
5
• Code changes are highly concentrated around the key functions
• 80% of patches 25% of its source code
• ......
• Memory error – Checking – Concurrency – Logic – Programming
• Memory errors: Null pointer & page alignment
• Complex page states Checking & logic bugs
• ......
![Page 19: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/19.jpg)
Preview of Our Findings
5
• Code changes are highly concentrated around the key functions
• 80% of patches 25% of its source code
• ......
• Memory error – Checking – Concurrency – Logic – Programming
• Memory errors: Null pointer & page alignment
• Complex page states Checking & logic bugs
• ......
• Data structures -- Policy trade-off -- Fast path
• 4 data structures, 5 design trade-offs, 8 types of fast paths
• ......
![Page 20: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/20.jpg)
Preview of Our Findings
5
• Code changes are highly concentrated around the key functions
• 80% of patches 25% of its source code
• ......
• Memory error – Checking – Concurrency – Logic – Programming
• Memory errors: Null pointer & page alignment
• Complex page states Checking & logic bugs
• ......
• Data structures -- Policy trade-off -- Fast path
• 4 data structures, 5 design trade-offs, 8 types of fast paths
• ......
• 35 key functionalities in 13 hot files
• The well-developed memory allocators still have many checking & lock bugs
• ......
![Page 21: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/21.jpg)
Methodology Used in Our Study
6
Memory Allocation
Virtual Memory Management
Resource Controller Garbage Collection
Swapping
Page Cache & Write-back
Exception Handling Misc (e.g., data structure)
8 components
![Page 22: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/22.jpg)
Methodology Used in Our Study
6
Memory Allocation
Virtual Memory Management
Resource Controller Garbage Collection
Swapping
Page Cache & Write-back
Exception Handling Misc (e.g., data structure)
8 components
4587 patches in 5 years
![Page 23: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/23.jpg)
Methodology Used in Our Study
6
Patches
Description Follow-up
Discussions Source Code
Analysis
![Page 24: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/24.jpg)
Methodology Used in Our Study
6
Patches
Description Follow-up
Discussions Source Code
Analysis
BugID
Commit Time
Component Type Causes
Involved Functions……
MPatch
Labeling & MChecker
![Page 25: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/25.jpg)
How Is the Memory Manager Changed?
7
0
10
20
30
40
50
60
70
80
2.6.32 (2009) 2.6.33 (2010) 2.6.38 (2011) 3.2 (2012) 3.10 (2013) 3.14 (2014) 4.0-rc4 (2015)
Line
s of
Cod
e (x
1000
)
Linux version (released year)
![Page 26: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/26.jpg)
How Is the Memory Manager Changed?
7
0
10
20
30
40
50
60
70
80
2.6.32 (2009) 2.6.33 (2010) 2.6.38 (2011) 3.2 (2012) 3.10 (2013) 3.14 (2014) 4.0-rc4 (2015)
Line
s of
Cod
e (x
1000
)
Linux version (released year)
The LoC has increased by 60% since Linux 2.6.32.
![Page 27: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/27.jpg)
Where Is the Memory Manager Changing?
8
![Page 28: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/28.jpg)
Where Is the Memory Manager Changing?
8
Memory Manager Components
![Page 29: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/29.jpg)
Where Is the Memory Manager Changing?
8
Linux Version
![Page 30: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/30.jpg)
Where Is the Memory Manager Changing?
8
Number of Committed Patches
![Page 31: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/31.jpg)
Where Is the Memory Manager Changing?
8
![Page 32: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/32.jpg)
Where Is the Memory Manager Changing?
8
80% of the code changes 25% of the source code
![Page 33: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/33.jpg)
Where Is the Memory Manager Changing?
8
![Page 34: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/34.jpg)
Where Is the Memory Manager Changing?
8
![Page 35: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/35.jpg)
Where Is the Memory Manager Changing?
8
![Page 36: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/36.jpg)
Where Is the Memory Manager Changing?
8
![Page 37: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/37.jpg)
Where Is the Memory Manager Changing?
8
13 hot files from 90 files recent development focus
![Page 38: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/38.jpg)
0
10
20
30
40
50
60
2.6.33 (2010) 2.6.38 (2011) 3.2 (2012) 3.10 (2013) 3.14 (2014) 4.0-rc4 (2015)
Per
cent
age
(%)
Linux version (released year)
Bug Code Maintenance Optimization New Feature
Why Is the Memory Manager Changed?
9
![Page 39: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/39.jpg)
0
10
20
30
40
50
60
2.6.33 (2010) 2.6.38 (2011) 3.2 (2012) 3.10 (2013) 3.14 (2014) 4.0-rc4 (2015)
Per
cent
age
(%)
Linux version (released year)
Code Maintenance New Feature
Why Is the Memory Manager Changed?
9
![Page 40: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/40.jpg)
0
10
20
30
40
50
60
2.6.33 (2010) 2.6.38 (2011) 3.2 (2012) 3.10 (2013) 3.14 (2014) 4.0-rc4 (2015)
Per
cent
age
(%)
Linux version (released year)
Bug Optimization
Why Is the Memory Manager Changed?
9
70% more bugs in well-developed memory manager!
![Page 41: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/41.jpg)
On the Bugs in Memory Manager
10
![Page 42: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/42.jpg)
On the Bugs in Memory Manager
10
Types of Memory Bugs
![Page 43: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/43.jpg)
On the Bugs in Memory Manager
10
Memory Manager Component
![Page 44: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/44.jpg)
On the Bugs in Memory Manager
10
Memory Allocation: 26%, Virtual Memory Management: 22%, GC: 14%
![Page 45: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/45.jpg)
On the Bugs in Memory Manager
10
![Page 46: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/46.jpg)
On the Bugs in Memory Manager
10
• Page alignment
• Null pointer
![Page 47: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/47.jpg)
On the Bugs in Memory Manager
10
• Page alignment
• Null pointer
• Inappropriate check
• Missing check
• Wrong check
![Page 48: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/48.jpg)
On the Bugs in Memory Manager
10
• Page alignment
• Null pointer
• Inappropriate check
• Missing check
• Wrong check
• Lock contention
• Missing lock
![Page 49: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/49.jpg)
On the Bugs in Memory Manager
10
• Page alignment
• Null pointer
• Inappropriate check
• Missing check
• Wrong check
• Lock contention
• Missing lock
• Fault handler
• State update
• Case-by-case
![Page 50: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/50.jpg)
On the Bugs in Memory Manager
10
• Page alignment
• Null pointer
• Inappropriate check
• Missing check
• Wrong check
• Lock contention
• Missing lock
• Fault handler
• State update
• Case-by-case
• API
• Misc
![Page 51: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/51.jpg)
Memory Bugs: Case Studies
11
Page Alignment
mm/nommu.c
@@ -1762,6 +1765,8 @@ unsigned long do_mremap(unsigned long addr,
struct vm_area_struct *vma;
/* insanity checks first */
if (old_len == 0 || new_len == 0)
return (unsigned long) -EINVAL;
![Page 52: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/52.jpg)
Memory Bugs: Case Studies
11
Page Alignment
mm/nommu.c
@@ -1762,6 +1765,8 @@ unsigned long do_mremap(unsigned long addr,
struct vm_area_struct *vma;
/* insanity checks first */
if (old_len == 0 || new_len == 0)
return (unsigned long) -EINVAL;
Bug: device drivers’ mmap() failed.
Cause: NOMMU does not do page_align(), which is inconsistent with MMU arch.
![Page 53: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/53.jpg)
Memory Bugs: Case Studies
11
Page Alignment
mm/nommu.c
@@ -1762,6 +1765,8 @@ unsigned long do_mremap(unsigned long addr,
struct vm_area_struct *vma;
/* insanity checks first */
+ old_len = PAGE_ALIGN(old_len);
+ new_len = PAGE_ALIGN(new_len);if (old_len == 0 || new_len == 0)
return (unsigned long) -EINVAL;
Bug: device drivers’ mmap() failed.
Cause: NOMMU does not do page_align(), which is inconsistent with MMU arch.
![Page 54: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/54.jpg)
Memory Bugs: Case Studies
12
Checking
mm/bootmem.c
@@ -156,21 +157,31 @@ static void __init
free_bootmem_core(bootmem_data_t *bdata, unsigned long addr,
![Page 55: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/55.jpg)
Memory Bugs: Case Studies
12
Checking
mm/bootmem.c
@@ -156,21 +157,31 @@ static void __init
free_bootmem_core(bootmem_data_t *bdata, unsigned long addr,
Bug: free pages wrongly.
Cause: miss boundary checking.
![Page 56: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/56.jpg)
Memory Bugs: Case Studies
12
Checking
mm/bootmem.c
@@ -156,21 +157,31 @@ static void __init
free_bootmem_core(bootmem_data_t *bdata, unsigned long addr,
+ BUG_ON(!size);
+
+ /* out range */
+ if (addr + size < bdata->node_boot_start ||
+ PFN_DOWN(addr) > bdata->node_low_pfn)
+ return;
Bug: free pages wrongly.
Cause: miss boundary checking.
![Page 57: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/57.jpg)
Memory Optimizations
13
Radix Tree Red-black Tree Bitmap List
Data Structures
4
![Page 58: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/58.jpg)
Memory Optimizations
13
Radix Tree Red-black Tree Bitmap List
Data Structures
Decentralize data structures: per-core/per-node/per-device approaches.
4
![Page 59: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/59.jpg)
Memory Optimizations
13
Radix Tree Red-black Tree Bitmap List
Data Structures
4
5Policy Trade-offs
Latency Vs. Throughput Synchronous Vs. Asynchronous
Lazy Vs. Non-lazy Local Vs. Global Fairness Vs. Performance
![Page 60: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/60.jpg)
Memory Optimizations
13
Radix Tree Red-black Tree Bitmap List
Data Structures
4
5Policy Trade-offs
Latency Vs. Throughput Synchronous Vs. Asynchronous
Lazy Vs. Non-lazy Local Vs. Global Fairness Vs. Performance
8Fast Paths
Code Reduction Lockless Optimization Inline
Code Shifting
New Function
State Caching Group Execution Optimistic Barrier
![Page 61: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/61.jpg)
Memory Optimizations: Policy Trade-offs
14
33%
22%
18%
16%
11%Latency Vs. Throughput
Fairness Vs. Performance
Lazy Vs. Non-lazy
Synchronous Vs. Asynchronous
Local Vs. Global
![Page 62: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/62.jpg)
Memory Optimizations: Policy Trade-offs
14
33%
22%
18%
16%
11%Latency Vs. Throughput
Fairness Vs. Performance
Lazy Vs. Non-lazy
Synchronous Vs. Asynchronous
Local Vs. Global
137 patches committed especially for reducing
the latencies of memory operations.
![Page 63: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/63.jpg)
Memory Optimizations: Policy Trade-offs
14
33%
22%
18%
16%
11%Latency Vs. Throughput
Fairness Vs. Performance
Lazy Vs. Non-lazy
Synchronous Vs. Asynchronous
Local Vs. Global
Lazy policy: delay expensive operations.
May change the execution order of functions.
![Page 64: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/64.jpg)
Memory Optimizations: Policy Trade-offs
14
33%
22%
18%
16%
11%Latency Vs. Throughput
Fairness Vs. Performance
Lazy Vs. Non-lazy
Synchronous Vs. Asynchronous
Local Vs. Global
Lazy policy: delay expensive operations.
May change the execution order of functions.
vmalloc Lazy TLB flush, lazy unmapping
mempolicy Lazy page migration between nodes
huge_memory Lazy huge zero page allocation
![Page 65: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/65.jpg)
Memory Optimizations: Policy Trade-offs
14
33%
22%
18%
16%
11%Latency Vs. Throughput
Fairness Vs. Performance
Lazy Vs. Non-lazy
Synchronous Vs. Asynchronous
Local Vs. Global
Mostly considered in
memory allocation & GC
![Page 66: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/66.jpg)
Memory Optimizations: Policy Trade-offs
14
33%
22%
18%
16%
11%Latency Vs. Throughput
Fairness Vs. Performance
Lazy Vs. Non-lazy
Synchronous Vs. Asynchronous
Local Vs. Global
Async is popular,
but be careful to its fault handlers!
![Page 67: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/67.jpg)
Memory Optimizations: Policy Trade-offs
14
33%
22%
18%
16%
11%Latency Vs. Throughput
Fairness Vs. Performance
Lazy Vs. Non-lazy
Synchronous Vs. Asynchronous
Local Vs. Global
Async is popular,
but be careful to its fault handlers!
E.g., early termination
![Page 68: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/68.jpg)
Memory Optimizations: Policy Trade-offs
14
33%
22%
18%
16%
11%Latency Vs. Throughput
Fairness Vs. Performance
Lazy Vs. Non-lazy
Synchronous Vs. Asynchronous
Local Vs. Global Decentralizing global structures
for better scalability
![Page 69: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/69.jpg)
Memory Optimizations: Policy Trade-offs
14
33%
22%
18%
16%
11%Latency Vs. Throughput
Fairness Vs. Performance
Lazy Vs. Non-lazy
Synchronous Vs. Asynchronous
Local Vs. Global Decentralizing global structures
for better scalability
E.g., dynamic per-cpu allocator.
![Page 70: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/70.jpg)
Memory Optimizations: Fast Path
15
4%4%5%
6%
8%
12%
27%
34%Code Reduction
New Function
Lockless Optimization
State Caching
Inline Code Shifting
Group Execution Optimistic Barrier
![Page 71: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/71.jpg)
Memory Optimizations: Fast Path
15
4%4%5%
6%
8%
12%
27%
34%Code Reduction
New Function
Lockless Optimization
State Caching
Inline Code Shifting
Group Execution Optimistic Barrier
Simplify the slow path logic
![Page 72: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/72.jpg)
mm/memory.c
@@ -303,8 +303,10 @@ static void __munlock_pagevec(
if (PageLRU(page)) {
lruvec = mem_cgroup_page_lruvec(page, zone);
lru = page_lru(page);
-
- get_page(page);
+ /*
+ * We already have pin from follow_page_mask()
+ * so we can spare the get_page() here.
+ */
Memory Optimizations: Fast Path
15
4%4%5%
6%
8%
12%
27%
34%Code Reduction
New Function
Lockless Optimization
State Caching
Inline Code Shifting
Group Execution Optimistic Barrier
Simplify the slow path logic
E.g., Avoid redundant get/put_page in munlock_vma_range as
pages will not be referred anymore.
![Page 73: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/73.jpg)
Memory Optimizations: Fast Path
15
4%4%5%
6%
8%
12%
27%
34%Code Reduction
New Function
Lockless Optimization
State Caching
Inline Code Shifting
Group Execution Optimistic Barrier
Reduce the usage of lock and atomic operations
![Page 74: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/74.jpg)
Memory Optimizations: Fast Path
15
4%4%5%
6%
8%
12%
27%
34%Code Reduction
New Function
Lockless Optimization
State Caching
Inline Code Shifting
Group Execution Optimistic Barrier
Reduce the usage of lock and atomic operations
E.g., lockless memory allocator in SLUB
![Page 75: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/75.jpg)
Memory Optimizations: Fast Path
15
4%4%5%
6%
8%
12%
27%
34%Code Reduction
New Function
Lockless Optimization
State Caching
Inline Code Shifting
Group Execution Optimistic Barrier
Cache states to avoid expensive operations
![Page 76: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/76.jpg)
Memory Optimizations: Fast Path
15
4%4%5%
6%
8%
12%
27%
34%Code Reduction
New Function
Lockless Optimization
State Caching
Inline Code Shifting
Group Execution Optimistic Barrier
Cache states to avoid expensive operations
E.g., pre-calculate the number of online nodes vs. always
calling expensive num_online_nodes
![Page 77: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/77.jpg)
Memory Optimizations: Fast Path
15
4%4%5%
6%
8%
12%
27%
34%Code Reduction
New Function
Lockless Optimization
State Caching
Inline Code Shifting
Group Execution Optimistic Barrier
Move infrequently executed code from
fast path to slow path
![Page 78: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/78.jpg)
Memory Optimizations: Fast Path
15
4%4%5%
6%
8%
12%
27%
34%Code Reduction
New Function
Lockless Optimization
State Caching
Inline Code Shifting
Group Execution Optimistic Barrier
Move infrequently executed code from
fast path to slow path
E.g., in SLUB allocator, slow path executes the interrupt
enable/disable handlers, fast path executes them only at fallback
![Page 79: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/79.jpg)
Memory Semantics
16
Memory Resource Controller
memory cgroup
charge/uncharge
cgroup management
memcontrol.c
![Page 80: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/80.jpg)
Memory Semantics
16
Memory Resource Controller
memory cgroup
charge/uncharge
cgroup management
memcontrol.c
Bug: Concurrency issues
![Page 81: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/81.jpg)
Memory Semantics
16
Memory Resource Controller
memory cgroup
charge/uncharge
cgroup management
memcontrol.c
Bug: Concurrency issues
Cause: missing locks in charging & uncharging pages(truncation, reclaim, swapout and migration)
![Page 82: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/82.jpg)
Memory Semantics
17
Virtual Memory Management
memory policy
![Page 83: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/83.jpg)
Memory Semantics
17
Virtual Memory Management
memory policy
policy definition
policy enforcement
mempolicy.c
![Page 84: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/84.jpg)
Memory Semantics
17
Virtual Memory Management
memory policy
policy definition
policy enforcement
mempolicy.c
Bug: policy enforcement failure
![Page 85: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/85.jpg)
Memory Semantics
17
Virtual Memory Management
memory policy
policy definition
policy enforcement
mempolicy.c
Bug: policy enforcement failure
Cause: missing check on page states & statistics,
e.g., whether a page is dirty, cache hit/miss rate
![Page 86: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/86.jpg)
Conclusion
18
Pattern Memory Bug
+Optimization
+Semantic
+
![Page 87: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/87.jpg)
Conclusion
18
Pattern Memory Bug
+Optimization
+Semantic
+
• Complex page states Concurrency bugs Simplified page management
• Fast path Introduce new errors Fast path verification
• Bugs in checking Model checking for memory manager
• ......
![Page 88: An Evolutionary Study of Linux Memory …jhuang95/papers/atc16_slides_huang.pdfMemory Management for Fun and Profit Jian Huang Moinuddin K. Qureshi Karsten Schwan Virtual Memory: A](https://reader034.fdocuments.us/reader034/viewer/2022042409/5f24d8a42f82cc52805b8677/html5/thumbnails/88.jpg)
19
Jian Huang
Moinuddin K. Qureshi Karsten Schwan
Thanks!
Q&A