VMA merging in Linux
Název práce v češtině: | Spojování VMA regionů v operačním systému Linux |
---|---|
Název v anglickém jazyce: | VMA merging in Linux |
Klíčová slova: | Linux|kernel|virtual memory|C |
Klíčová slova anglicky: | Linux|kernel|virtual memory|C |
Akademický rok vypsání: | 2020/2021 |
Typ práce: | diplomová práce |
Jazyk práce: | angličtina |
Ústav: | Katedra distribuovaných a spolehlivých systémů (32-KDSS) |
Vedoucí / školitel: | RNDr. Mgr. Vlastimil Babka, Ph.D. |
Řešitel: | skrytý![]() |
Datum přihlášení: | 20.01.2021 |
Datum zadání: | 20.01.2021 |
Datum potvrzení stud. oddělením: | 02.05.2022 |
Datum a čas obhajoby: | 13.09.2022 09:00 |
Datum odevzdání elektronické podoby: | 21.07.2022 |
Datum odevzdání tištěné podoby: | 25.07.2022 |
Datum proběhlé obhajoby: | 13.09.2022 |
Oponenti: | doc. Ing. Lubomír Bulej, Ph.D. |
Konzultanti: | prof. Ing. Petr Tůma, Dr. |
Zásady pro vypracování |
The Linux kernel manages virtual address space of each process using virtual memory area (VMA) structures to represent mapped ranges. The VMA structures are organized in a red-black tree as well as a linked list, using the lower virtual address boundary as a sorting key.
The memory areas can be created, removed, resized, split or merged as a result of mmap(), munmap(), mremap(), mprotect() and other syscalls. Ideally, each virtually contiguous range mapping a single linear file segment, or anonymous memory, with single set of attributes such as read-write-protection, would be always represented with a single VMA. However, for anonymous memory ranges the current implementation may not merge their VMA structures after non-contiguous ranges become contiguous due to a mremap() call. Thus in processes utilizing mremap() heavily this limitation results in extra memory and CPU overhead due to larger VMA trees. Also due to another limitation of mremap() implementation, it's impossible to mremap() areas that should be contiguous, but consist of multiple VMA structures, in a single syscall. The goal of this thesis is to identify the VMA merging limitations and remove them in as many scenarios as feasible, and to demonstrate the benefits of proper VMA merging. |
Seznam odborné literatury |
[1] Mel Gorman - Understanding the Linux Virtual Memory Manager, https://www.kernel.org/doc/gorman
[2] Jon Corbet - The case of the overly anonymous anon_vma, https://lwn.net/Articles/383162 [3] LWN Kernel Index - Memory Management, https://lwn.net/Kernel/Index/#Memory_management [4] Linux Kernel Documentation, https://www.kernel.org/doc/html/latest |