Debugging the SLUB allocator in the Linux kernel
Ladění SLUB alokátoru v Linux kernelu
bakalářská práce (OBHÁJENO)
Zobrazit/ otevřít
Trvalý odkaz
http://hdl.handle.net/20.500.11956/148406Identifikátory
SIS: 236735
Kolekce
- Kvalifikační práce [11979]
Autor
Vedoucí práce
Konzultant práce
Tůma, Petr
Oponent práce
Horký, Vojtěch
Fakulta / součást
Matematicko-fyzikální fakulta
Obor
Programování a softwarové systémy
Katedra / ústav / klinika
Katedra distribuovaných a spolehlivých systémů
Datum obhajoby
10. 9. 2021
Nakladatel
Univerzita Karlova, Matematicko-fyzikální fakultaJazyk
Angličtina
Známka
Výborně
Klíčová slova (česky)
linux|kernel|alokátor|SLUB|laděníKlíčová slova (anglicky)
linux|kernel|allocator|SLUB|debuggingTáto práca je zameraná na SLUB alokátor a nástroje na jeho ladenie. V SLUB alo- kátore existovali testy, ale nikto ich nepoužíval. Bolo to pretože neexistovala štruktúra na ich automatické testovanie v kerneli. Tento projekt pridal jeden zo spôsobov na tes- tovanie SLUBu v kerneli, KUnit testovanie. Do tohto rozhrania boli s malými zmenami pridané predchádzajúce testy. Takisto, na základe systematického prehľadania commitov spojených so SLUBom boli pridané nové regresné testy. V ďalšej časti práce sú rozšírené ladiace možnosti SLUBu pre sledovanie alokovania, vrátane efektívneho ukladania stack trace. Posledná časť zlepšuje virtuálny súborový systém debugfs, ktorý poskytuje infor- mácie o kernelových komponentoch do user space, pridaním stack trace do virtuálych súborov SLUBu. Navyše tento projekt pomáha sledovať efektivitu používania SLUB ca- che z hľadiska veľkosti objektu. Všetky tieto zmeny by mali pomôcť pri ladení SLUBu. Niektoré zmeny boli podané a dokonca prijaté komunitov, takže boli pridané do Linuxu verzie 5.14. 1
This thesis is focused on the SLUB memory allocator and its debugging functionalities. The SLUB allocator implementation included several tests, but nobody was running them. It was because no automated kernel testing infrastructure existed for them. This project added one of the kernel testing frameworks, the KUnit testing, for SLUB. Existing tests were integrated into this framework with some minor changes. Also, new regression tests were added based on a systematic review of commits associated with SLUB. Another part of the thesis extends the SLUB debug options for tracking allocation events, including more efficient stack trace storage. The last part improves the virtual file system debugfs that provide information about kernel components to userspace by including stack traces in SLUB's virtual files. Also, this project helps to track the efficiency of the SLUB cache usage in terms of object size. All of these changes to the Linux kernel should help with SLUB debugging. Some of the changes were also submitted and even accepted by the community, they were added into Linux version 5.14. 1
