# Kernel Subsystem Pocket Index (Hit ==**`Esc`**== to see the map) ---- ## About 1. This is a collection of materials that I watch/read through my journey of leaning the kernel. 2. Over time, I found that there are more and more moments where I say "*let me send a cool conference video to you and you'll know*". 3. That was the moment where I thought I should make this list! ---- ## About 1. Don't worry about the amount of information here! 2. Those are the results of decades of collaboration of human minds, like all the amazing architecture in the world. 3. To explore it, you don't have to first be an archeologist. 4. Some trainings are needed to appreciate it's depth, but that's doable! 5. Think of them nice fairy tales -- except they are something you can actually touch! ---- ## Some Hints to Start with 1. Take the [LFD103](https://training.linuxfoundation.org/training/a-beginners-guide-to-linux-kernel-development-lfd103/) training from Linux Foundation. 2. If you don't know what to do with this list, try **ftrace (`trace-cmd`)** in the **Debugging** section. 3. Let curiosity be your guide! ---- ## Important Notice 1. Materials here are for pedagogical purposes. 2. They are meant for bootstrapping one's knowledge before they can learn independently from the LKML, kernel documentation, and kernel source code. 3. They focus mostly on high-level introductions and hobbyist experiments that are easily reproducible. 4. Do mind that there will be a lot detail in each topic not listed here. ---- ## Important Notice This list is CC-BY-SA --- # Development Process & Tooling ---- ## Development Process ---- ### Overview - [Member training: Upstream Kernel Development (Part I)](https://www.youtube.com/live/DxLB7T5Lp6Y) - [Member training: Upstream Kernel Development (Part II)](https://www.youtube.com/live/UENZ0zO2UEs) - [Getting to Know the Linux Kernel: A Beginner's Guide - Kelsey Steele & Nischala Yelchuri, Microsoft](https://youtu.be/QatE61Ynwrw) - [Getting Into Linux Kernel Development After 30 Years - Muhammad Usama Anjum, Collabora](https://youtu.be/xtXn45cnVzE) - [Mentorship Session: Maintainership & Growing Influence in the Linux Kernel Community](https://youtu.be/wjk2MgpQ8Is) - [Beginner Linux kernel maintainers toolbox - Krzysztof Kozlowski](https://youtu.be/doUuj1qCggY) ---- ### Kernel Release Model - [Kernel Recipes 2017 - Linux Kernel release model - Greg KH](https://youtu.be/RKadXpQLmPU) - [Day-to-day Testing of Linux 'Next' Kernel Branch - My Story - Marek Szyprowski, Samsung Electronics](https://youtu.be/RSM_Tkl9YYk) - [Kernel Recipes 2016 - From ‘git tag’ to the front page - Konstantin Ryabitsev](https://youtu.be/vohrz14S6JE) - [An engineer's guide to Linux Kernel upgrades - Ignat Korchagin - NDC TechTown 2023](https://youtu.be/VfEHZnwdpw4) ---- ### Coding Patterns - [Kernel Coding the Upstream Way - Tim Bird, Sony](https://youtu.be/dApfkuObBW8) - [Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel](https://youtu.be/9UQs1ca5Uwk) - [Progress On Bounds Checking in C and the Linux Kernel - Kees Cook, Google & Gustavo A.R. Silva](https://youtu.be/V2kzptQG5_A) ---- ### Stable Releases - [Kernel Recipes 2017 - Linux Kernel release model - Greg KH](https://youtu.be/RKadXpQLmPU) - [Kernel Recipes 2015 - Linux Stable Release process - by Greg KH](https://youtu.be/grHAFt95oTw) ---- ## git ---- ### Overview of git - [Git it right! [Workshop] - Git Merge 2022](https://youtu.be/5xaag3aXcQ0) - [So You Think You Know Git - FOSDEM 2024](https://youtu.be/aolI_Rz0ZqY) - [So You Think You Know Git Part 2 - DevWorld 2024](https://youtu.be/Md44rcw13k4) - [Advanced Git Magic - Pauline Vos - Full Stack Europe 2022](https://youtu.be/9TGdH7CrNyE) - [CSESoc | Git Gud](https://www.youtube.com/live/Gq7xpDiZ8Zo) ---- ### Interrogators - `show`, `log`, `diff`, `blame` etc. - [*Backporting and conflict resolution*](https://www.kernel.org/doc/html/latest/process/backporting.html) - [So You Think You Know Git - FOSDEM 2024](https://youtu.be/aolI_Rz0ZqY) ---- ### `git bisect` - [Git driven debugging - Git Merge 2022](https://youtu.be/b0CLgnDKeKM) - [Debugging with Git Bisect](https://youtu.be/Ks10Mv_KxNI) - [Using git bisect to pinpoint bugs in your commit history](https://youtu.be/KKeucpfAuuA) - [Howto: git bisect PPC64 PS3 Linux kernel USB regression!](https://www.youtube.com/live/ROGTY-SnjTo) ---- ### `git worktree` - [How to use Git Worktree](https://youtu.be/8ezj3Rh72Xw) - [How to Use Git Worktree | Checkout Multiple Git Branches at Once](https://youtu.be/s4BTvj1ZVLM) ---- ### `git rebase` (interactive) - [Git Rebase Interactive :: A Practical Example](https://youtu.be/tukOm3Afd8s) - [Inserting a Commit into a Patch Series](https://youtu.be/DPKsOdXVNpA) - [Reordering Commits in Git](https://youtu.be/V9KpcGO7nLo) - [Squashing Git commits with Interactive Rebase](https://youtu.be/7IfkL8swmFw) ---- ### `git rebase` - [RubyConf 2019 - Story telling with Git rebase by Elle Meredith](https://youtu.be/-WsjKCledP4) ---- ### `git cherry-pick` - [Backporting to Stable Branches](https://youtu.be/RxDt5qVO0RM) ---- ### Internals of `git` - [The Git Parable - a different approach to understanding Git (90 min) - Johan Herland](https://youtu.be/jm7QsI-nNjk) - [OSCON 2016: Dissecting Git's Guts - Git Internals - Emily Xie](https://youtu.be/YUCwr1Y6bFI) - [A tour of Git internals](https://youtu.be/pfOAxFWNUkQ) - [Git Internals - How Git Works - Fear Not The SHA!](https://youtu.be/P6jD966jzlk) - [How does Git actually work? - CB Bailey & Andy Balaam [ACCU 2019]](https://youtu.be/N0m42TKk_dc) - [Deep Dive into Git - Edward Thomson](https://youtu.be/fBP18-taaNw) - [Git Internals: a Database Perspective - Git Merge 2022](https://youtu.be/YdstUWcg5j4) ---- ## Getting Patches (from mailing lists) ---- ### Xapian Query Syntax 1. [public-inbox help](https://lore.kernel.org/all/_/text/help/#search) from any mailing list archive 2. [*Getting Started with Xapian*](https://getting-started-with-xapian.readthedocs.io/en/latest/concepts/search/queryparser.html) 3. [*Xapian::QueryParser Syntax*](https://xapian.org/docs/queryparser.html) on the official documentation of Xapian ---- ### `lei` 1. [*Using lei, b4, and mutt to do kernel development*](https://josefbacik.github.io/kernel/2021/10/18/lei-and-b4.html) 2. [*lore+lei: part 1, getting started*](https://people.kernel.org/monsieuricon/lore-lei-part-1-getting-started) 3. [*lore+lei: part 2, now with IMAP*](https://people.kernel.org/monsieuricon/lore-lei-part-2-now-with-imap) 4. [`lei-q(1)`](https://man.archlinux.org/man/lei-q.1.en) 5. [Beginner Linux kernel maintainers toolbox - Krzysztof Kozlowski](https://youtu.be/doUuj1qCggY?si=nIF7xq5Zk7ReZLaN&t=1732) 6. [Doing more with lore and b4 - Konstantin Ryabitsev (34:10 ~ FIN)](https://youtu.be/wTpQYM08_Yg?t=2050) ---- ### Applying Patches (from mailing lists) 1. [git-am - Apply a series of patches from a mailbox](https://git-scm.com/docs/git-am) 2. [How to apply patches from the Linux Kernel Mailing List](https://blog.reds.ch/?p=1814) 3. [Applying Patches To The Linux Kernel (obsolete)](https://www.kernel.org/doc/html/latest/process/applying-patches.html) 4. [am,shazam: retrieving and applying patches](https://b4.docs.kernel.org/en/latest/maintainer/am-shazam.html) from B4 end-used doc. ---- ### Getting Patches (from git trees) ---- ### Backporting - [Backporting Linux Kernel patches](https://youtu.be/sBR7R1V2FeA) - [Shung-Hsi Yu: Backporting BPF: Techniques and Challenges](https://youtu.be/PPM51Mu4fAQ) - [Backporting to Stable Branches](https://youtu.be/RxDt5qVO0RM) - [Michal Kubeček: Backporting horror stories](https://youtu.be/zh_pXHEWqIk) - [LAS16-101: Efficient kernel Backporting](https://youtu.be/-z7_eOR7_Ug) - [Contributing to the CentOS Stream Kernel - Prarit Bhargava and Don Zickus](https://youtu.be/3J6BjXjc_hQ) ---- ### Sending Patches ---- ### Upstreaming Process - [*Submitting Your First Patch to the Linux Kernel and Responding to Feedback*](https://nickdesaulniers.github.io/blog/2017/05/16/submitting-your-first-patch-to-the-linux-kernel-and-responding-to-feedback/) - [Getting to Know the Linux Kernel: A Beginner's Guide - Kelsey Steele & Nischala Yelchuri, Microsoft](https://youtu.be/QatE61Ynwrw) - [Baby Steps to Kernel Hacking - Sayli Yogesh Karnik, Credit Suisse](https://youtu.be/_Gs3kJUmgIA) - [Tutorial: From an Idea to a Patch in the Linux Mainline - Marta Rybczynska, Various Projects](https://youtu.be/b36OPAMfuZo) ---- ### `b4` (Links) 1. [*B4 end-user documentation*](https://b4.docs.kernel.org/en/latest/) 2. [*Using lei, b4, and mutt to do kernel development*](https://josefbacik.github.io/kernel/2021/10/18/lei-and-b4.html) 3. [*Use b4 for kernel contributions*](https://www.marcusfolkesson.se/blog/use-b4-for-kernel-contributions/) 4. [*Sending a kernel patch with b4 (part 1)*](https://people.kernel.org/monsieuricon/sending-a-kernel-patch-with-b4-part-1) 5. [*End-to-end patch attestation with patatt and b4*](https://people.kernel.org/monsieuricon/end-to-end-patch-attestation-with-patatt-and-b4) ---- ### `b4` (Videos) - [Doing more with lore and b4 - Konstantin Ryabitsev (00:00 ~ 34:10)](https://youtu.be/wTpQYM08_Yg) - [Submit a kernel patch with b4](https://youtu.be/QBR06ml2YLQ) - [Submit a follow-up patch with b4](https://youtu.be/-Vld9aoFPwU) - [Beginner Linux kernel maintainers toolbox - Krzysztof Kozlowski (31:23)](https://youtu.be/doUuj1qCggY?si=d7V8MM_sTDWB0U2f&t=1883) - [Comparing and Contrasting Patman Vs B4 for Posting Patches - Doug Anderson, Google (27:58)](https://youtu.be/7B3nKmBoFoQ?si=BwTG0GNzJJv6wsCs&t=1678) ---- ### `patman` - [Comparing and Contrasting Patman Vs B4 for Posting Patches - Doug Anderson, Google](https://youtu.be/7B3nKmBoFoQ) ---- ## Build System ---- ### Kconfig - [Introduction to Kernel Modules and Kbuild](https://www.youtube.com/live/3h7eupG37WQ) - [Managing Linux Kernel Configurations with Config Fragments - Darren Hart, VMware](https://youtu.be/J8zxekwYMDY) - [Krepair: Automatically Repairing .config Files to Cover Patches - Paul Gazzillo & Necip Yildiran](https://youtu.be/mOusQXEHQvY) ---- ### Kbuild - [A dive into kbuild - Cao jin, Fujitsu](https://youtu.be/qzLXmIOuiCs) - [Introduction to Kernel Modules and Kbuild](https://www.youtube.com/live/3h7eupG37WQ) ---- ### Makefile - [*Makefile Tutorial By Example*](https://makefiletutorial.com/) - [Demystifying Linux Kernel Initcalls! - Mylène Josserand, Collabora](https://youtu.be/ZDnvKitRhxo) (Example) ---- ### Building Kernel - [Linux bootcamp: From casual Linux user to kernel hacker - Part 3](https://youtu.be/K8OQ1IXgEys) - [Tim Beale: Linux Kernel Development for Newbies](https://youtu.be/OkhOoBqLb3Y) - [https://javiercarrascocruz.github.io/kernel-build-tricks](https://javiercarrascocruz.github.io/kernel-build-tricks) - [Embedded Linux from Scratch in 45 minutes, on RISC-V](https://youtu.be/cIkTh3Xp3dA) (Cross-compile example) ---- ### Kernel Image - [Linker scripts in the Linux Kernel, Kernel Image structure, and x86 boot sector debugging](https://youtu.be/W4VWFrMRyS8) ---- ### Emulation ---- ### QEMU - [*Fixing bugs in the Linux kernel with Syzbot, Qemu and GDB*](https://javiercarrascocruz.github.io/syzbot) - [Finding your way through the QEMU parameter jungle](https://youtu.be/Oscjpkns7tM) - [Let's Build Our Own Virtual RaspberryPi Using QEMU Virtualization - Vipul Gupta, balena](https://youtu.be/EYVkSUydqMI) - [Qemu Demystified - Florian Wagner](https://youtu.be/5e5HU5JdtO8) - [QEMU_4: System Mode Raspberry PI 3B](https://youtu.be/hsMtZuIHlX8) ---- ### `virtme-ng` - [Kernel Recipes 2024 - virtme-ng](https://youtu.be/pw0kA9w3kUo) - [Mentorship Session: Speeding Up Kernel Development With virtme-ng](https://youtu.be/ZgMLGM2UazY) - [Speeding up Kernel Testing and Debugging with virt-meng - Andrea Righi](https://youtu.be/SeOg6KR07to) ---- ### `virsh` - [Getting Started with Kernel-based Virtual Machine (KVM) - Leonard Sheng Sheng Lee, Computas](https://youtu.be/mAZNlyXVoT4) ---- ### Testing ---- ### Testing overview - ["The magical fantasy land of Linux kernel testing" - Russell Currey (LCA 2020)](https://youtu.be/9Fzd6MapG3Y) - [Tips for Writing Good Tests for Linux - Tim Bird, Sony](https://youtu.be/NzJFwCUGJtc) ---- ### Kselftest - ["How to write your first kernel selftest" - Michael Ellerman (LCA 2021 Online)](https://youtu.be/LQUGxewY1GI) - [Mentorship Session: Kernel Validation With Kselftest](https://youtu.be/mpO_iDEMqWQ) - [Kselftest Running in Test Rings - Where Are We? - Shuah Khan, The Linux Foundation](https://youtu.be/qvvPSgwyYwg) - [YVR18-301: Kselftest framework roadmap and discussion](https://youtu.be/5-xdDI4YOxY) ---- ### KUnit - ["KUnit: Past, Present, and Future" - David Gow (LCA 2021 Online)](https://youtu.be/Dzi2IrJ2z-I) - [Mentorship Session: KUnit Testing Strategies](https://youtu.be/i0xrfn5PSsM) - [XDC 2023 | October 17 | Status of KUnit tests on DRM subsystem | Arthur Grillo, Carlos Gallo Filho](https://youtu.be/NBivOyATgw0) - ["Kernel Testing with KUnit: Bridging the Gap" - David Gow (LCA 2022 Online)](https://youtu.be/Ffu08AL5WVI) ---- ### Linux Test Project (LTP) - [linux-test-project/ltp](https://github.com/linux-test-project/ltp) - [LinuxKernelTesting](https://youtube.com/playlist?list=PLpqQbpeQxfW16Gnz8iyCPloQKkFm5sd-k) (playlist) ---- ### Existing Testing Infrastructures ---- ### Linux Kernel Functional Testing (LKFT) - [Linux Kernel Functional Testing](https://lkft.linaro.org/) ---- ### KernelCI - [ELISA Seminar (September 2024) – Meet the New KernelCI](https://youtu.be/lUfxJ06XEyk) ---- ### Syzbot Board - [syzkaller.appspot.com](https://syzkaller.appspot.com/upstream) ---- --- # Debugging ---- ## Debugging Overview ---- ### Kernel Debugging Overview - [Tools and Techniques to Debug an Embedded Linux System - Sergio Prado, Embedded Labworks](https://youtu.be/dgPkZnGuIMg) - [Tools and Techniques to Debug an Embedded Linux System](https://youtu.be/4rBrS65P-yM) - [Mentorship Session: Linux Kernel Debugging Tricks of the Trade](https://youtu.be/FdNIiQxwJuk) - [Feb 8 at 5pm GMT "Kernel Debug Stories for Arm" (in English)](https://www.youtube.com/live/SbrRAwLEQ5o) ---- ### Print Debugging ---- ### Dynamic Debug - [dynamic-debug-howto](https://docs.kernel.org/admin-guide/dynamic-debug-howto.html) - [How to use the kernel dynamic debug](https://wiki.st.com/stm32mpu/wiki/How_to_use_the_kernel_dynamic_debug) - [SAN19-424 Event Tracing and Pstore with a pinch of Dynamic debug (37:01)](https://youtu.be/pPurUA6ybSc?si=BNjG8YWjYXB0pWBA&t=2221) ---- ### Debugfs - [DebugFS](https://docs.kernel.org/filesystems/debugfs.html) from kernel doc ---- ## OOPS and Post-Mortem ---- ### Kernel OOPS - [If (oops) { Do_not_panic(); } - Lucky Tyagi, Samsung Semiconductor India R&D Center](https://youtu.be/HLrYc8ta-3s) - [The tale of a single register value ](https://blog.cloudflare.com/the-tale-of-a-single-register-value/) - [Tools and Techniques to Debug an Embedded Linux System](https://youtu.be/4rBrS65P-yM) - [admin-guide/bug-hunting.html](https://docs.kernel.org/admin-guide/bug-hunting.html) ---- ### decode_stacktrace.sh - [Decoding stack traces in the Linux kernel](https://www.desmondcheong.com/blog/2021/06/02/decoding-stack-traces-in-the-linux-kernel/) - [The tale of a single register value](https://blog.cloudflare.com/the-tale-of-a-single-register-value/) - [Mentorship Session: Dynamic Program Analysis for Fun and Profit (31:39)](https://youtu.be/ufcyOkgFZ2Q?si=X7liijwrxKvvH8Vw&t=1899) ---- ### pstore - [Recovering the Linux kernel logs from a previous boot with pstore and ramoops](https://youtu.be/X4P0jirfyro) - [SAN19-424 Event Tracing and Pstore with a pinch of Dynamic debug](https://youtu.be/pPurUA6ybSc) ---- ### Kdump - [Kdump in an hour](https://www.youtube.com/playlist?list=PLMuBvrEUO0NVzIOxXXYiYNWxNQaY-V5J5) - [Postmortem Analysis with Kexec/kdump and Ftrace - Steven Rostedt, Google](https://youtu.be/aUGNDJPpUUg) - [Kernel Recipes 2015 - Kernel dump analysis - by Adrien Mahieux](https://youtu.be/j0UPYPUVgvQ) - [Marian Marinov - Analyzing Linux kernel crash dumps](https://youtu.be/wcId2Y9bM-M) - [Kernel dump analysis made quick and easy!](https://youtu.be/YpvFJ7cWaq0) ---- ## Kernel Tracing ---- ### Dynamic Tracing Overview - [Steven Rostedt on the Linux Kernel's "Hello World"](https://youtu.be/pCWDGlYZvEY) - [Mentorship Session: An Introduction to Linux Tracing and its Concepts](https://youtu.be/1KCXvTMYYAA) - [Tracing Summit 2022 - State of the Linux Tracers](https://youtu.be/Er8q8Vtp9eM) ---- ### ftrace (trace-cmd) - [See what your computer is doing with Ftrace utilities](https://youtu.be/68osT1soAPM) - [Finding Sources of Latency on your Linux System - Steven Rostedt, VMware](https://youtu.be/Tkra8g0gXAU) - [Embedded Recipes 2022 - Tracing on embedded boards](https://youtu.be/7KHLoZKwlBk) ---- ### ftrace (tracefs) - [Steven Rostedt - Learning the Linux Kernel with tracing](https://youtu.be/JRyrhsx-L5Y) - [BKK19-TR04 - Fantastic tracepoints and where to find them](https://youtu.be/NNBnYJdyTwg) - [LF Live Mentorship Session: Tracing with Ftrace: Critical Tooling for Linux Development](https://youtu.be/mlxqpNvfvEQ) - [Embedded Fest 2021. Steven Rostedt. Dynamic tracing within a busybox environment](https://youtu.be/TLCUe6AscSU) ---- ### LTTng - [Tracing Summit 2022 - LTTng: Beyond Ring-Buffer Based Tracing](https://youtu.be/fwM4pVQRbPM) - [[LEE3] System wide tracing with LTTNG Philip Dylan Gleonec, Savoir Faire Linux](https://youtu.be/n2CE5nQvD5w) - [Fine-grained Distributed Application Monitoring Using LTTng](https://youtu.be/qKqGo4FFPx0) ---- ## Event Sources ---- ### Events in the Kernel - [Probes in the kernel, where it goes - Mr HIRAMATSU, Masami](https://youtu.be/ZXUn8wUAxsU?si=r5yVyMA9Lp2HvOW5) - [Mentorship Session: An Introduction to Linux Tracing and its Concepts](https://youtu.be/1KCXvTMYYAA) - [pt_regs - the good the bad and the ugly - Florent Revest](https://youtu.be/Q91Mxda_2BM) ---- ### Tracepoints - [LF Live Mentorship Session: Tracing with Ftrace: Critical Tooling for Linux Development (07:03)](https://youtu.be/mlxqpNvfvEQ?si=kws9zCawUtZcS0kg&t=423) - [BKK19-TR04 - Fantastic tracepoints and where to find them](https://youtu.be/NNBnYJdyTwg) - [DEF CON 30 - Rex Guo, Junyuan Zeng - Trace me if you can: Bypassing Linux Syscall Tracing](https://youtu.be/yFl_ScKA300) - [SAN19-424 Event Tracing and Pstore with a pinch of Dynamic debug](https://youtu.be/pPurUA6ybSc) ---- ### Kprobes - [Where have all the kprobes gone - Jiri Olsa](https://youtu.be/Erqy3rxDp4g) - [Kprobes internals - Thomas Bitzberger - LSE Week 2017 (FR)](https://youtu.be/OqRdP3OBAew) ---- ### Probe-Hooking APIs in the kernel - [Jiri Wiesner Writing debugging modules](https://youtu.be/B7T8EUETmFM) ---- ## BPF ---- ### bpftrace - [Linux tracing made simpler with bpftrace - DevConf.CZ 2022](https://youtu.be/gSxntAO2Iys) - [An introduction to bpftrace tracing language - DevConf.CZ 2020](https://youtu.be/93aHXYqZmU0) - [bpftrace internals - DevConf.CZ 2020](https://youtu.be/nDY4iC_ekQY) ---- ### BCC - [Jan Kara Tracing and eBPF hands on session](https://youtu.be/sh6AYvMBERE) - [Linux Performance with eBPF and bcc-tools](https://www.youtube.com/live/aDJl7VxsA8s) - [Tutorial: Getting Started with eBPF - Liz Rice, Isovalent](https://youtu.be/TJgxjVTZtfw) - [Linux Tracing with BPF, BCC and More - Mauricio Vásquez Bernal & Alban Crequy, Kinvolk](https://youtu.be/xGTegj6MK7k) ---- ## Debuggers ---- ### KGDB - [Debugging the Linux kernel with GDB](https://sergioprado.blog/debugging-the-linux-kernel-with-gdb/) - [Debugging the Linux kernel with GDB](https://youtu.be/C55_fbAb_24) (Video) - [KGDB](https://www.youtube.com/playlist?list=PLpqQbpeQxfW1U0g3GpU8WvBGRj__Vmiwg) (playlist) - [Using Serial kdb / kgdb to Debug the Linux Kernel - Douglas Anderson, Google](https://youtu.be/HBOwoSyRmys) ---- ### drgn - [Michal Koutný Meeting drgn](https://youtu.be/_L96YsngFH0) - [Kernel Recipes 2022 - Powerful and Programmable Kernel Debugging with drgn](https://youtu.be/ukxH_55BiQE) ---- ## Compiler Instrumentation (Saniziters) ---- ### Sanitizer Overview - [Kernel Sanitizers Office Hours - POTAPENKO Alexander, VYUKOV Dmitry, COOK Kees, ELVER Marco, MCKE...](https://youtu.be/JK_oGcebEg8) - [Mentorship Session: Dynamic Program Analysis for Fun and Profit](https://youtu.be/ufcyOkgFZ2Q?si=37GgV91C3O-SlZAX) - [ELISA Summit (Sep 2022)| Using Memory Access Error Detection for Safety Argumentation](https://youtu.be/sLiuPNSNdGg) - [google/kernel-sanitizers](https://github.com/google/kernel-sanitizers/tree/master) ---- ### KASAN - [Embedded Fest 2021. Ruslan Bilovol. Linux Kernel hardening techniques](https://youtu.be/Pe206Lf9q8k) - [Sanitizing the Linux Kernel — On KASAN and other Dynamic Bug-finding Tools - Andrey Konovalov](https://youtu.be/KmFVPyHyfqQ) - [Mitigating Linux kernel memory corruptions with Arm Memory Tagging | Linux Security Summit 2021](https://youtu.be/UwMt0e_dC_Q) - [Jerome Marchand: KASan or how to get rid of memory corruption](https://www.youtube.com/live/sirdUMeZIxU) ---- ### KMEMLEAK - [Embedded Fest 2021. Ruslan Bilovol. Linux Kernel hardening techniques](https://youtu.be/Pe206Lf9q8k) ---- ### KFENCE - [ELISA Summit (Sep 2022)| Using Memory Access Error Detection for Safety Argumentation](https://youtu.be/sLiuPNSNdGg) - [google/kernel-sanitizers](https://github.com/google/kernel-sanitizers/tree/master) - [Linux SLUB Allocator Internals and Debugging - KFENCE, Part 4 of 4](https://blogs.oracle.com/linux/post/linux-slub-allocator-internals-and-debugging-4) ---- ### UBSAN - [Embedded Fest 2021. Ruslan Bilovol. Linux Kernel hardening techniques](https://youtu.be/Pe206Lf9q8k) ---- ### KCSAN - [Mentorship Session: The Kernel Concurrency Sanitizer](https://youtu.be/k4oe2MrGfDc?t=2548) - [LPC 2020 - Refereed Track - Day 1](https://www.youtube.com/live/gJRBmunG47w?feature=share&t=7140) (01:59:00) (title: Data-race detection in the Linux Kernel) - [*Concurrency bugs should fear the big bad data-race detector (part 1)*](https://lwn.net/Articles/816850/) - [*Concurrency bugs should fear the big bad data-race detector (part 2)*](https://lwn.net/Articles/816854/) ---- ### Lockdep - [What Lockdep Does and Doesn't - Byungchul Park, LG Electronics](https://youtu.be/KjmIXN-SQOw) - [LPC2018 - Recursive read deadlocks and Where to find them](https://youtu.be/KsASrJKUp-w) ---- ## Static Tools ---- ### sparse - [Mentorship Session: Static Analysis & Tools](https://youtu.be/BrY8F6L1OgA) - [Sparse warnings](https://youtu.be/hmCukzpevUc) ---- ### smatch - [Mentorship Session: New Ideas for Smatch (Static Analysis)](https://youtu.be/zZGvKcPYhe0) - [MAD24 216 What Can Static Analysis Do For You Smatch](https://youtu.be/wO_4w9-emrs) - [Linux Kernel Development - Smatch](https://javiercarrascocruz.github.io/smatch) ---- ### Coccinelle - [Mentorship Session: Coccinelle: Automating Large-scale Evolution and Bug Finding in C Code](https://youtu.be/16wUxqDf1GA) - [SAN19-500K1 Keynote: Coccinelle: 10 Years of Automated Evolution in the Linux Kernel](https://youtu.be/16wUxqDf1GA) ---- --- # Concurrency ---- ## Sources of Concurrency - Any PREEMPT_RT talk: figure out what was changed by PREEMPT_RT -- and revert it back! - [Unreliable Guide To Hacking The Linux Kernel](https://docs.kernel.org/kernel-hacking/hacking.html) - Hint: you can use ***latency output*** of `trace-cmd` to know the context (IRQ, softirq, process) a function is in. - See the description in `-l` option of [trace-cmd-report(1)](https://man7.org/linux/man-pages/man1/trace-cmd-report.1.html). - Also see [Latency trace format](https://docs.kernel.org/trace/ftrace.html#latency-trace-format). ---- ### IRQ - [A Journey into Linux Interrupt Handling Bottom Halves - Allen Pais, Microsoft](https://youtu.be/kC-SB8k02aE) - [IRQs: the Hard, the Soft, the Threaded and the Preemptible](https://youtu.be/-pehAzaP1eg) - [Understanding Linux Interrupt Subsystem - Priya Dixit, Samsung Semiconductor India Research](https://youtu.be/LOCsN3V1ECE) ---- ### softirq - [A Journey into Linux Interrupt Handling Bottom Halves - Allen Pais, Microsoft](https://youtu.be/kC-SB8k02aE) - [Getting Around to It: Deferred Work in the Linux Kernel - Alison Chaiken, Aurora Innovation](https://youtu.be/rmv40f5K8AI) - [IRQs: the Hard, the Soft, the Threaded and the Preemptible](https://youtu.be/-pehAzaP1eg) - [Unblocking the softirq lock for PREEMPT_RT - Sebastian Siewior](https://youtu.be/rrb9KdHrFSw) ---- ### Processes - [Context Switching in the Linux Kernel - Sharad](https://youtu.be/QGcBNwrKiX0) - [Tutorial: Leveraging the OS CPU Scheduler to Write Real-Time MT Apps - Kaiwan Billimoria, kaiwanTECH](https://youtu.be/h9psonTquHU) - [Thread implementation #5 - Linux context switch | cs370](https://youtu.be/3gOk3-X4y2U) - [Breaking and Protecting Linux Kernel Stack - Elena Reshetova, Intel](https://youtu.be/FacpjoQbMhU) - [Threads in Embedded Linux- 6 Easy Pieces - Loïc Domaigné, Doulos](https://youtu.be/706vGMVPovk) - The *Demystifying the Linux CPU Scheduler* book by [sysprog21](https://github.com/sysprog21) (not yet published). ---- ### Preemption - [(Part 2, 9am GMT) Using Linux-Kernel for Real-Time systems (51:15)](https://www.youtube.com/live/9DmQXy7Fcro?si=6CQ3prQvlAd8f4HY&t=3075) - [Giovanni Gherdovich: Recent works on kernel preemption models](https://youtu.be/WCVhjLwxaUI) - [Giovanni Gherdovich The four kernel preemption flavors in Linux](https://youtu.be/ty9L1zbPRRs) - [Real time Linux - Bogdan Lezhepekov, Radoslav Kolev (18:15)](https://youtu.be/iMwDMmRV73U&t=1095) - [An introduction to real-time Linux](https://youtu.be/-wAo6bWh4jM) - [Kernel Recipes 2023 - Coming soon](https://youtu.be/Fwvj0442ub0) ---- ## Deferring Workload (to processes) ---- ### Workqueue - [A Journey into Linux Interrupt Handling Bottom Halves - Allen Pais, Microsoft](https://youtu.be/kC-SB8k02aE) - [Getting Around to It: Deferred Work in the Linux Kernel - Alison Chaiken, Aurora Innovation (24:02)](https://youtu.be/rmv40f5K8AI?si=zKUswtZTtLQC9i9t&t=1442) - [What You Always Wanted to Know About Workqueues](https://youtu.be/zno3WFng61w) ---- ### Threaded IRQ - [What Every Driver Developer Should Know about RT - Julia Cartwright, National Instruments (08:55)](https://youtu.be/-J0y_usjYxo&t=535) - [TUT 1279 The four kernel preemption flavors in Linux (17:02)](https://youtu.be/KBI_LqIVet4&t=1022) ---- ### kthread - [Let's code a Linux Driver - 14: Threads in a Linux Kernel Module](https://youtu.be/YfVQt3CD8hk) ---- ## Deferring Workload (to softirq) ---- ### tasklet - [The end of tasklets](https://lwn.net/Articles/960041/) on LWN - [Modernizing the tasklet API](https://lwn.net/Articles/830964/) on LWN - [IRQs: the Hard, the Soft, the Threaded and the Preemptible (37:02 ~ 39:59)](https://youtu.be/-pehAzaP1eg?t=2222) ---- ## Schedulers ---- ### Scheduler Overview - [(Part 1, 9am GMT) Using Linux kernel for Real-Time Systems (21:49)](https://www.youtube.com/live/Jw6k-aZxRZI) - [(Part 2, 9am GMT) Using Linux-Kernel for Real-Time systems (12:08)](https://www.youtube.com/live/9DmQXy7Fcro) - [Brief History of Linux CPU Scheduler - Huichun Feng](https://youtu.be/XpFWPgofFR8) - [YVR18-220:The Linux Kernel Scheduler (For Beginners)](https://youtu.be/5WtnnzpwEuA) - [BKK19-TR03 - The Linux Kernel Scheduler - Overview](https://youtu.be/oOiaRHC9ZDg) - [SAN19-220 Deep dive in the scheduler](https://youtu.be/_re97U8Vlzc) ---- ### fair_sched - [(Part 1, 9am GMT) Using Linux kernel for Real-Time Systems (21:49)](https://www.youtube.com/live/Jw6k-aZxRZI?si=wIJ_DtO94bxMP6Li&t=1309) - [(Part 2, 9am GMT) Using Linux-Kernel for Real-Time systems (12:08)](https://www.youtube.com/live/9DmQXy7Fcro?si=yQorPHxQMptHAh7Q&t=728) - [Michal Koutný: EEVDF is the new (sched_)normal](https://youtu.be/zSWO2x2ck70) - [From Linux CFS Scheduler to Goroutine Scheduler](https://youtu.be/7h-mQ_bWWHg) - [SAN19-419 Why you should use the SCHED_IDLE CFS scheduling policy](https://youtu.be/h9et2PAD_38) - [Introduction to SCHED_NORMAL (Peter Zijlstra)](https://www.youtube.com/live/ifGbigHM6bM?feature=share) ---- ### rt_sched - [(Part 1, 9am GMT) Using Linux kernel for Real-Time Systems (32:19)](https://www.youtube.com/live/Jw6k-aZxRZI?si=06eY5vMKYCbtgc5V&t=1940) - [(Part 2, 9am GMT) Using Linux-Kernel for Real-Time systems (20:22)](https://www.youtube.com/live/9DmQXy7Fcro?si=6NSwKmZFVOuINsVd&t=1222) ---- ### dl_sched - [(Part 1, 9am GMT) Using Linux kernel for Real-Time Systems (38:10)](https://www.youtube.com/live/Jw6k-aZxRZI?si=dUey-3l99H-0Qi84&t=2290) - [(Part 2, 9am GMT) Using Linux-Kernel for Real-Time systems (23:08)](https://www.youtube.com/live/9DmQXy7Fcro?si=WpKEO4XucA2qnvlU&t=1388) - [SCHED_DEADLINE semi partitioned scheduler and dlmon](https://youtu.be/vQleH9KfhZc) - [Embedded Recipes 2017 - Understanding SCHED_DEADLINE - Steven Rostedt](https://youtu.be/2b1xM_j5uWE) - [Results from using SCHED_DEADLINE for energy-aware optimization of RT DAGs on heterogeneous hardware](https://youtu.be/w1xyb8dZkcU) ---- ## Locks ---- ### spinlock - [Real time Linux - Bogdan Lezhepekov, Radoslav Kolev (20:44)](https://youtu.be/iMwDMmRV73U&t=1244) - [Alex Kogan — New locks for the old kernel](https://youtu.be/Hqqo862HH_w) - [Parallelisation in the Linux Kernel - Handmade Seattle 2020](https://youtu.be/r8SYpRY9viA) - Also see [*Unreliable Guide To Locking*](https://docs.kernel.org/kernel-hacking/locking.html) on kernel doc. ---- ### mutex - [Let's code a Linux Driver - 28: Mutex exclusive access to shared resources](https://youtu.be/ga3v3jux7r0) - A sleeping lock. Unable to protect against things that are out of scheluer's control (e.g. IRQ and softirq). ---- ### semaphore - [*The shrinking role of semaphores*](https://lwn.net/Articles/928026) on LWN ---- ### RCU - [Decoding Those Inscrutable RCU CPU Stall Warnings](https://youtu.be/23_GOr8Sz-E) - [Mentorship Session: Unraveling RCU-Usage Mysteries (Fundamentals)](https://youtu.be/K-4TI5gFsig) - [Mentorship Session: Unraveling RCU-Usage Mysteries (Additional Use Cases)](https://youtu.be/tBl3yh6Mc1c) ---- ## Barriers ---- ### Compiler Barrier - [Mentorship Session: The Kernel Concurrency Sanitizer](https://youtu.be/k4oe2MrGfDc) - [Status Report: Broken Dependency Orderings in the Linux Kernel - Marco Elver, Paul Heidekrüger](https://youtu.be/ad-75tViBm4) ---- ### CPU Barriers - [Mentorship Session: The Kernel Concurrency Sanitizer](https://youtu.be/k4oe2MrGfDc) - [Does an x86 CPU Reorder Instructions?](https://youtu.be/CY_88l_x-gU) - [Arm's Weakly-Ordered Memory Model and Barrier Requirements - Ash Wilding, Amazon](https://youtu.be/2I8OHacills) ---- ### Memory Model - [Mentorship Session: The Kernel Concurrency Sanitizer](https://youtu.be/k4oe2MrGfDc) - [More Science Fiction than Fairy Tale: A Discussion of the Linux Kernel Memory Mo... Jonas Oberhauser](https://youtu.be/iFDKhIxKhoQ) - [P99 CONF 2023 | How to Avoid Learning the Linux-Kernel Memory Model by Paul McKenney](https://youtu.be/T7VwKaU129w) - [Kernel Recipes 2024 - Case Study: Concurrent Counting](https://youtu.be/mD78298bEUA) ---- ## System Calls ---- ### System Calls - [Syscalls and Strace](https://youtu.be/-2jstkyudnQ) - [What Have Syscalls Done for you Lately?](https://youtu.be/8g-NUUmCeGI) - [MAD24 315 Rethinking the kernel system call entry](https://youtu.be/bdFILtH_q10) - [Linux ABI - Syscalls in Assembly and Calling Assembly from C](https://youtu.be/s9IZ9QT5yhw) - For x86-64 `syscall`/`sysret` instruction, see videos in [Arch2001](https://www.youtube.com/watch?v=dkU4dp66wiM&list=PLUFkSN0XLZ-myVyCmMvfz_W5Z5SauI3cN&index=33) and its [full playlist](https://www.youtube.com/playlist?list=PLUFkSN0XLZ-myVyCmMvfz_W5Z5SauI3cN). ---- ### strace - [Strace: Monitoring The Kernel-User-Space Conversation - Michael Kerrisk](https://youtu.be/oFt6V56BOlo) - [Modern strace - DevConf.CZ 2023](https://youtu.be/VI4OLrSP3_A) - [Tutorial: Debugging with Strace - A Peek Behind the Scenes of Linux Processes - Avikam Rozenfeld](https://youtu.be/SUO0rQerpMk) - [Using strace to troubleshoot issues - DevConf.CZ 2021](https://youtu.be/Rryi_1JZnuc) - [Using Strace to Understand GitLab - Part 1: Intro](https://youtu.be/fcY5pPUq35U) - [Using Strace to Understand GitLab - Part 2: Git](https://youtu.be/tThs8QeP2qY) ---- ### vDSO - [Using GNU poke: looking at the vDSO](https://youtu.be/_IktUhUdcg0) ---- ## Timers and Timekeeping ---- ### Timers and Timekeeping - [Mentorship Session: The Ticking Beast: a Deep Dive Into Timers, Timekeeping, Tick & Tickless Kernels](https://youtu.be/o54jmIr1xLg) - [Timekeeping in the Linux Kernel - Stephen Boyd, Qualcomm Innovation Center](https://youtu.be/Puv4mW55bF8) ---- ### hrtimer - [Let's code a Linux Driver - 9: High Resolution Timer in a Linux Kernel Module](https://youtu.be/3Djn_iGf7K8) ---- --- # Memory Management ---- ## Memory Management Overview ---- ### Overview - [Tutorial: Linux Memory Management and Containers - Gerlof Langeveld, AT Computing](https://youtu.be/ql1axx--8sI) - [Inspecting and Optimizing Memory Usage in Linux - João Marcos Costa, Bootlin](https://youtu.be/pIR1H7ZyWe4) - [Kernel Recipes 2024 - All your memory are belong to… whom?](https://youtu.be/1RSKNTVf7tU) - [Introduction to Memory Management in Linux](https://youtu.be/7aONIVSXiJ8) - [Page table reclaim - David Hildenbrand](https://youtu.be/naO_BRhcU68) - [Introduction to Memory Management in Linux by Alan Ott_HD.mp4](https://youtu.be/yj2gCw5NpEU) ---- ## Virtual Address Spaces ---- ### Address Space Layout (Talks) - [Tutorial: Linux Memory Management and Containers - Gerlof Langeveld, AT Computing](https://youtu.be/ql1axx--8sI) - [LVC20 106 4G 4G virtual memory split in arm32 kernel](https://youtu.be/lHsnJ3UIugk) - [Introduction to Memory Management in Linux](https://youtu.be/7aONIVSXiJ8) - [Introduction to Memory Management in Linux by Alan Ott_HD.mp4](https://youtu.be/yj2gCw5NpEU) - [February 20th Linaro Forum for Arm Linux Kernel Topics](https://youtu.be/oOb1Z9EjDOc) ---- ### Address Space Layout (Links) Division of virtual memory in arm32: 1. https://people.kernel.org/linusw/how-the-arm32-kernel-starts 2. https://people.kernel.org/linusw/setting-up-the-arm32-architecture-part-1 3. https://people.kernel.org/linusw/setting-up-the-arm32-architecture-part-2 For the x86_64: 1. https://www.kernel.org/doc/Documentation/x86/x86_64/mm.txt ---- ### The Kernel Space - [Tutorial: Linux Memory Management and Containers - Gerlof Langeveld, AT Computing](https://youtu.be/ql1axx--8sI) - [Direct Map Management - Mike Rapoport](https://youtu.be/egC7ZK4pcnQ) ---- ## Physical Address Space ---- ### Physical Address Space = [Mentorship Session: Debugging Linux Memory Management Subsystem](https://youtu.be/fwLoPtTCmnw) - [Arch4001 03 Input Output 01 MMIO 01 Overview](https://youtu.be/mNRehvEbOfc) - [Arch4001 03 Input Output 01 MMIO 02 What Does It Mean To Be Memory Mapped](https://youtu.be/YDmbESJf6L0) - [SUSE Labs Conference 2020 - DMA mapping for the Raspberry Pi 4](https://youtu.be/I3iRRYjfPFY) ---- ### Pages - [Tutorial: Linux Memory Management and Containers - Gerlof Langeveld, AT Computing (27:34)](https://youtu.be/ql1axx--8sI?si=dvbiMMNsvJLNUx1C&t=1654) - [Mentorship Session: Debugging Linux Memory Management Subsystem](https://youtu.be/fwLoPtTCmnw) - [Inspecting and Optimizing Memory Usage in Linux - João Marcos Costa, Bootlin (3:31)](https://youtu.be/pIR1H7ZyWe4?si=oihImhlqcKtkAg_7&t=211) - [Kernel Recipes 2024 - All your memory are belong to… whom?](https://youtu.be/1RSKNTVf7tU) - [Linux Memory Management - VMScan | DEEP LINUX](https://youtu.be/tpRlczF0pqw) ---- ### Zones (Links) 1. [Physical Memory](https://docs.kernel.org/mm/physical_memory.html) in the Linux Kernel Documentation. 2. [Hierarchical NUMA](https://blog.linuxplumbersconf.org/2017/ocw/system/presentations/4656/original/Hierarchical_NUMA_Design_Plumbers_2017.pdf) on [LPC2017](https://blog.linuxplumbersconf.org/2017/ocw/sessions/4656.html) and its [audio recording](https://blog.linuxplumbersconf.org/2017/wp-content/audio/0914-THU/PlatinumD/04AnshumanKhandual.mp3). 3. [*How the Linux kernel divides up your RAM*](https://utcc.utoronto.ca/~cks/space/blog/linux/KernelMemoryZones) in Chris's Wiki. ---- ### Zones (Talks) - [Tutorial: Linux Memory Management and Containers - Gerlof Langeveld, AT Computing (43:23)](https://youtu.be/ql1axx--8sI?si=a2OlyiSRvc7qt8La&t=2603) - [Inspecting and Optimizing Memory Usage in Linux - João Marcos Costa, Bootlin (5:42)](https://youtu.be/pIR1H7ZyWe4?si=xd6vDfPmg6pj65Ml&t=342) - [SUSE Labs Conference 2020 - DMA mapping for the Raspberry Pi 4 (27:25)](https://youtu.be/I3iRRYjfPFY?si=2qCKq-iNCwb7bH7l&t=1645) ---- ## Memory Allocation in Kernel ---- ### Page Allocator 1. [Linternals: Memory Allocators [0x01]](https://sam4k.com/linternals-memory-allocators-part-1/) 2. [13. Memory Management in Linux Kernel](https://youtu.be/UdzBOTcJOgM) ---- ### Slab Allocator - Kernel used to have three flavors of slab allocators: SLOB, SLAB, and SLUB. - SLOB and SLAB were removed. SLUB is the only one remaining. - [SLUB Internals for Exploit Developers - Andrey Konovalov, xairy.io](https://youtu.be/2hYzxsWeNcE?si=fwonqkLzaQelAEMf) - And its [slides](https://static.sched.com/hosted_files/lsseu2024/37/2024%2C%20LSS%20EU_%20SLUB%20Internals%20for%20Exploit%20Developers.pdf) are also worth looking into. - [ECE-T480 - Spring 2021: Lecture 16 (the slab allocator)](https://youtu.be/pFi-JKgoX-I) - [How to display kernel slab cache information using Slabtop](https://youtu.be/-cCylHVdC5w) ---- ### `kmalloc()` - [*Memory Allocation Guide*](https://docs.kernel.org/core-api/memory-allocation.html) from kernel doc ---- ### `vmalloc()` - [*Memory Allocation Guide*](https://docs.kernel.org/core-api/memory-allocation.html) from kernel doc ---- ## Paging (Hardware) ---- ### x86-64 1. Paging part of the [Architecture 2001: Intel x86-64 OS Internals](https://youtube.com/playlist?list=PLUFkSN0XLZ-myVyCmMvfz_W5Z5SauI3cN&si=qQKtbdx-YBIRxmds). 2. [Mentorship Session: Debugging Linux Memory Management Subsystem](https://youtu.be/fwLoPtTCmnw) ---- ### arm64 - ["Large Virtual Address support (52-bit) in ARM64 kernel" - Bhupesh Sharma (LCA 2021 Online)](https://youtu.be/eAmaZ0wLfHg) - [LVC21-221 Large Virtual Address support 52 bit in ARM64 kernel](https://youtu.be/Q1rjKPlN4ho) ---- ### RISC-V (Links) 1. [*The RISC-V Instruction Set Manual, Volume II: Privileged Architecture*](https://five-embeddev.com/riscv-priv-isa-manual/Priv-v1.12/priv-intro.html#introduction). 2. [*4.3 Sv32: Page-Based 32-bit Virtual-Memory Systems*](https://five-embeddev.com/riscv-priv-isa-manual/Priv-v1.12/supervisor.html#sec:sv32) 3. [*4.4 Sv39: Page-Based 39-bit Virtual-Memory System*](https://five-embeddev.com/riscv-priv-isa-manual/Priv-v1.12/supervisor.html#sec:sv39) 4. [*4.5 Sv48: Page-Based 48-bit Virtual-Memory System*](https://five-embeddev.com/riscv-priv-isa-manual/Priv-v1.12/supervisor.html#sec:sv48) 5. [*4.6 Sv57: Page-Based 57-bit Virtual-Memory System*](https://five-embeddev.com/riscv-priv-isa-manual/Priv-v1.12/supervisor.html#sec:sv57) 6. [*RISC-V: mm: Make SV48 the default address space*](https://lwn.net/Articles/939327/) in LWN ---- ### RISC-V (Videos) - [COSC562 - Sv39 MMU System](https://youtu.be/Doud5Kh3Jes) ---- ## The Userspace ---- ### vm_area_struct - [Process Address Space: The way to create virtual address (page table) of userspace application](https://www.slideshare.net/slideshow/process-address-space-the-way-to-create-virtual-address-page-table-of-userspace-application-251425396/251425396) by Adrian Huang - [ProcessAddressSpace](https://students.mimuw.edu.pl/ZSO/Wyklady/04_processes2/ProcessAddressSpace.pdf) - [Tracing on Page Table - YuHsiang Tseng & ChinEn Lin, National Taiwan Ocean University](https://youtu.be/Of1KXLHpZDg) - [Lower Response Time of Fork by Extending Copy-on-write to the Page Table - Chih-En Lin](https://youtu.be/J53PxYfpro4) - [Structures to manage the stack, virtual memory, and process ids in the Linux kernel](https://youtu.be/yaxcsAt8Mhw) - [Hiding Process Memory via Anti-Forensic Techniques](https://youtu.be/tMxCfxjtvnk) - [The Maple Tree + Lock Scalability - Liam Howlett and Michel Lespinasse](https://youtu.be/12GNb53g3ZA) ---- ## Paging ---- ### Page Tables - [ELISA Seminar (June 2022): What is a page table?](https://youtu.be/NRBrZ381ZPQ) - [Mentorship Session: Huge Page Concepts in Linux](https://youtu.be/n67gCNiKVcw) (first 30 minutes or so) ---- ### Page Faults - [Kernel Recipes 2023 - Faster & Fewer Page Faults](https://youtu.be/TEHRMzZ01nE) - [The Maple Tree + Lock Scalability - Liam Howlett and Michel Lespinasse](https://youtu.be/12GNb53g3ZA) - [Long Live Asynchronous Page Fault! - Vitaly Kuznetsov & Vivek Goyal, Red Hat](https://youtu.be/vRrv8OqyyWI) ---- ### Page Reclam - [Overview of memory reclaim in the current upstream kernel - Vlastimil Babka](https://youtu.be/0bnWQF7WQP0) - [MGLRU - Yu Zhao](https://youtu.be/9HvJfN21H9Y) - [Page table reclaim - David Hildenbrand](https://youtu.be/naO_BRhcU68) ---- ## Other Topics ---- ### History of Slab Allocators in Kernel - [Kernel Exploitation - Slab Allocators](https://youtu.be/4UucTCiQLXE) - [Vlastimil Babka The rise and fall of kernel slab allocators](https://youtu.be/OM-bEHQweHY) - [Reducing the Kernel's Slab Allocators: Progress Report - Vlastimil Babka, SUSE](https://youtu.be/KAx1Wa-Q6k8) - [[PATCH v2 0/6] remove SLOB and allow kfree() with kmem_cache_alloc()](https://lore.kernel.org/all/20230317104307.29328-1-vbabka@suse.cz/) - [[PATCH v2 00/21] remove the SLAB allocator](https://lore.kernel.org/all/20231120-slab-remove-slab-v2-0-9c9c70177183@suse.cz/) ---- --- # Drivers ---- ## Driver Core ---- ### Kernel Modules - [2 ELC-2018 EALE Introduction to Kernel Modules - Behan Webster](https://youtu.be/kptfcbRfFvU) - [Linux bootcamp: From casual Linux user to kernel hacker - Part 4](https://youtu.be/A1_XsMc3JCY) - [Understanding the Structure of a Linux Kernel Device Driver](https://youtu.be/pIUTaMKq0Xc) - [Into the Jungle - How to write a Linux kernel driver for any subsystem - Marta Rybczynska](https://youtu.be/3ckHwb_CcV4) - ---- ### Driver Model - [Embedded Recipes 2019: Herd your socs become a matchmaker](https://youtu.be/SQJBz115rXg) - [Linux Matchmaking: Helping devices and drivers find each other](https://archive.fosdem.org/2024/schedule/event/fosdem-2024-3222-linux-matchmaking-helping-devices-and-drivers-find-each-other/) - [Embedded Linux kernel and driver development training](https://bootlin.com/training/kernel/) by Bootlin (free access). - [5 ELC-2018 EALE I2C Drivers - Michael Opdenacker](https://youtu.be/78n3lAco6KE): example using I2C bus. - [Working with devicetree](https://www.doulos.com/events/on-demand/working-with-devicetrees/): Free, but can only be accessed after registration. ---- ### udev - [Introducing Udev on Oracle Linux](https://youtu.be/9UQs1ca5Uwk) - [[ENG] Christian Brauner: "Making the Kernel and Udev Namespace Aware" / #LinuxPiter](https://youtu.be/ondREXbSa5E) - [*Dynamic kernel device management with udev*](https://documentation.suse.com/sles/15-SP3/html/SLES-all/cha-udev.html) - [*An introduction to Udev: The Linux subsystem for managing device events*](https://opensource.com/article/18/11/udev) - [*udev: Device Manager for the Linux Kernel in Userspace*](https://insujang.github.io/2018-11-27/udev-device-manager-for-the-linux-kernel-in-userspace/) - [*udev: Function Flow for KOBJECT_UEVENT kernel group message*](https://insujang.github.io/2018-11-28/udev-function-flow-for-kobject_uevent-kernel-group-message/) ---- ## Hardware Descriptions ---- ### Device tree - [Webinar On-Demand: Demystifying Device Tree for NXP® i.MX Processors](https://youtu.be/iCZE52QLzoY) - [Enabling new hardware on embedded Linux (from schematics to the device tree)](https://youtu.be/NfOuD129q80) - [Demystifying Device Tree Concepts - Priya Dixit](https://youtu.be/8aRWMVeEpdc) - [FOSDEM 2024 - From phone hardware to mobile Linux](https://youtu.be/VMOxarhhYuM) - [Device Tree: hardware description for everybody !](https://youtu.be/Nz6aBffv-Ek) - [5 ELC-2018 EALE I2C Drivers - Michael Opdenacker](https://youtu.be/78n3lAco6KE): example using I2C bus. ---- ### ACPI - [ACPI Source Language (ASL) Tutorial](https://www.intel.com/content/www/us/en/content-details/772722/basic-acpi-source-language-asl-constructs-tutorial.html) from Intel. - [Andy Shevchenko | ACPI overlays for embedded devices](https://youtu.be/nlKjUAv3RL0) - [Kernel Recipes 2015 - Representing device-tree peripherals in ACPI - by David Woodhouse](https://youtu.be/p7MoTngjMcI) ---- ## Buses (that don't enumerate) (There are more buses in the world, but those are the more easily accessible ones.) ---- ### Platform - [BoF: Early Platform Drivers in Linux Kernel - Bartosz Golaszewski, BayLibre](https://youtu.be/VCOL1TWSs0I) (first 5 minutes) ---- ### I2C - [Basics of I2C on Linux - Luca Ceresoli, Bootlin](https://youtu.be/g9-wgdesvwA) - [5 ELC-2018 EALE I2C Drivers - Michael Opdenacker](https://youtu.be/78n3lAco6KE) - [Tutorial: Introduction to I2C and SPI: Both In-kernel and In-userspace - Michael Welling](https://youtu.be/c10wAKWpjts) - [Custom I2C peripheral in QEMU](https://mistrasolutions.com/page/qemu-custom-i2c-peripheral/) ---- ### SPI - [6 ELC-2018 EALE SPI Drivers - Michael Welling](https://youtu.be/JSg3iJ5PRg8) - [Tutorial: Introduction to I2C and SPI: Both In-kernel and In-userspace - Michael Welling](https://youtu.be/c10wAKWpjts) - [Groking the Linux SPI Subsystem - Matt Porter, Konsulko](https://youtu.be/MV8Sy6jGUIE) - [Custom SPI peripheral in QEMU](https://mistrasolutions.com/page/qemu-custom-spi-peripheral/) ---- ## Buses (that enumerate) ---- ### PCI and PCIe - Some of the videos in [Arch4001](https://www.youtube.com/watch?v=TC9jkrU6UeM&list=PLUFkSN0XLZ-luMwgYBYD8BBa713NJuwra&index=21) (playlist) - [Linux PCI(e) Driver Tutorial](https://youtube.com/playlist?list=PLCGpd0Do5-I3HkdOJ6SaFwNJgAcj8cDAh) (playlist) ---- ### USB - [A Tour of USB Device Controller (UDC) in Linux - Hervé Codina, Bootlin](https://youtu.be/LJuE2RhfgnA) - [Debugging Usually Slightly Broken (USB) Devices and Drivers - Krzysztof Opasiak, Samsung](https://youtu.be/6UHqtbiJX94) - [Watch Linux kernel developer write a USB driver from scratch in just 3h for Apple Xserve front-panel](https://youtu.be/IXBC85SGC0Q) ---- ## Resource Abstraction ---- ### GPIO - [Introduction to Pin Muxing and GPIO Control Under Linux - Neil Armstrong, BayLibre](https://youtu.be/v8j1atWLRXo) - [Linus Walleij - GPIO and Pin Control for Embedded Systems](https://youtu.be/AvuOKGvka9g) - [GPIO for Engineers and Makers](https://youtu.be/lQRCDl0tFiQ) - [Linux GPIO: Evolution and Current State of the User API](https://youtu.be/lQRCDl0tFiQ) - [[ENG] Bartosz Golaszewski: "New GPIO interface for linux user space"](https://youtu.be/BK6gOLVRKuU) ---- ### IRQ (General) - [IRQs: the Hard, the Soft, the Threaded and the Preemptible](https://youtu.be/-pehAzaP1eg) - [Getting Around to It: Deferred Work in the Linux Kernel - Alison Chaiken, Aurora Innovation](https://youtu.be/rmv40f5K8AI) - [Understanding Linux Interrupt Subsystem - Priya Dixit, Samsung Semiconductor India Research](https://youtu.be/LOCsN3V1ECE) ---- ### IRQ (x86) - [[x86] Linux Kernel Interrupt Delivery Configuration: How the Linux Kernel Interacts with Hardware - Adrian Huang, Lenovo](https://youtu.be/UqnixJCpHGM) ---- ### IRQ (Arm) - [Asahi Linux: PCI power management](https://www.youtube.com/live/xlNBi8wLyY8) - [How Dealing with Modern Interrupt Architectures can Affect Your Sanity](https://youtu.be/YE8cRHVIM4E) - [LVC20 102 Interrupt sub system in ARM boards using Xilinx Zynq Board](https://youtu.be/0OT_d8guDN0) - [Asahi Linux: PCI power management](https://www.youtube.com/live/xlNBi8wLyY8) (first hour or so) ---- ### Pinctrl - [Introduction to Pin Muxing and GPIO Control Under Linux - Neil Armstrong, BayLibr](https://youtu.be/v8j1atWLRXo) - [Tutorial: Spelunking for Hardware Data - Matt Porter, Konsulko Group](https://youtu.be/HO68sK6E0B8) - [Linus Walleij - GPIO and Pin Control for Embedded Systems](https://youtu.be/AvuOKGvka9g) ---- ### regmap - [Simplify and Reuse Your Driver's Code with Regmaps - Ioan Adrian Ratiu, Collabora Ltd](https://youtu.be/ZSl7S58z8e0) ---- ### clocks - [Mentorship Session: The Ticking Beast: a Deep Dive Into Timers, Timekeeping, Tick & Tickless Kernels](https://youtu.be/o54jmIr1xLg) - [Timekeeping in the Linux Kernel - Stephen Boyd, Qualcomm Innovation Center](https://youtu.be/Puv4mW55bF8) - [Tutorial: What The Clock! - Linux Clock Subsystem Internals - Neil Armstrong, BayLibre SAS](https://youtu.be/Io2r3STrMSo) - [Updating and Modernizing Clk (Clock) Drivers - Chen-Yu Tsai, Google](https://youtu.be/Io2r3STrMSo) ---- ### DMA - [Taming DMA: Tales Wrestling Memory Corruption - Ahmad Fatoum, Pengutronix](https://youtu.be/OMaOco0W-4Q) - [*Dmaengine overview*](https://wiki.stmicroelectronics.cn/stm32mpu/wiki/Dmaengine_overview) on STM32MP WiKi - [Laurent Pinchart - mastering the dma and iommu apis | ELC 2014](https://youtu.be/n07zPcbdX_w) - [Linux DMA In Device Drivers](https://youtu.be/_HvxP0TSxNg) - [Using DMA in a Linux PCI or PCI Express Driver](https://youtu.be/BDYbR1S9oHE) ---- ## Other topics ---- ### DT Schema - [How to Get Your DT Schema Bindings Accepted in Less Than 10 Iterations - Krzysztof Kozlowski, Linaro](https://youtu.be/JrwZ4xLBU38) ---- ### Firmware APIs - [The `linux-firmware` repository](https://gitlab.com/kernel-firmware/linux-firmware) - [Unravelling How Firmware Interacts with the Linux Subsystem - Smitha T Murthy](https://youtu.be/vsP-lclzyMI) - [Getting a Time of Flight Camera Working in Linux, the Full Story from Kernel to User Space](https://youtu.be/dVFsSNUkF6Y) - [*Linux Kernel Development - Firmware API*](https://javiercarrascocruz.github.io/linux-firmware-api) ---- ### device_link - [Kernel Recipes 2019 - What To Do When Your Device Depends on Another One](https://youtu.be/Nkh-EDGD8HM) --- # Power Management ---- ## Overview ---- ### Overview - [Kernel Recipes 2015 - Introduction to Kernel Power Management - by Kevin Hilman](https://youtu.be/juJJZORgVwI) - [Power management on Linux: from the hardware to the kernel and userspace interfaces](https://youtu.be/_Ae94bujJoQ) - [Power management techniques on embedded Linux](https://youtu.be/DJDrfsSgqO0) - [YVR18-221:Linux Kernel Power Management Features - An Overview](https://youtu.be/ph3ucxIGPXc) - [BKK19-TR02 - Linux Kernel Power Management - 101](https://youtu.be/lpzniFSLDqs) - [Michael Turquette: "Introduction to Power Management" [ENG]](https://youtu.be/p69ouMAplec) ---- ## System-wide Suspend ---- ### System Sleep States (Talks) - [Is Linux Suspend ready for the next decade - Len Brown](https://youtu.be/Pv5KvN0on0M) - [Evolution of Suspend-to-Idle Support in The Linux Kernel - Rafael Wysocki (LCA 2021 Online)](https://youtu.be/wvcM-Uf3DBU) - [BKK19-119 - Device power management and idle](https://youtu.be/LaFartS_dv0) ---- ### System Sleep States (Links) 1. [*System Sleep States*](https://www.kernel.org/doc/html/latest/admin-guide/pm/sleep-states.html#system-sleep-states) of the kernel documentation. 2. [*Power management/Suspend and hibernate*](https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate) in Arch Wiki 3. [*Suspend and hibernate*](https://wiki.gentoo.org/wiki/Suspend_and_hibernate) in Gentoo Wiki. 4. [`include/linux/pm.h`](https://elixir.bootlin.com/linux/latest/source/include/linux/pm.h#L311) in Linux kernel. 5. [*Device Power Management Basics*](https://www.kernel.org/doc/html/latest/driver-api/pm/devices.html) in Linux Kernel Documentaion to see how devices handle the system-wide suspension. ---- ### Freeze (s2idle) - [Evolution of Suspend-to-Idle Support in The Linux Kernel - Rafael Wysocki (LCA 2021 Online)](https://youtu.be/wvcM-Uf3DBU) ---- ### Standby - [Is Linux Suspend ready for the next decade - Len Brown](https://youtu.be/Pv5KvN0on0M?si=rPTXXQXiZtQ4JFsz&t=152) (02:31) : "*...standby is sort of deprecated. I haven't seen standby on a machine for years.*" ---- ### Deep (s2ram) - [*Suspend-to-RAM*](https://docs.kernel.org/admin-guide/pm/sleep-states.html#suspend-to-ram) - [Unlocking the Potential of Suspend to RAM Using Linux in a Multi-Core, Multi-Firmware Automotive SoC - Grégory Clement, Bootlin](https://youtu.be/sN4krurp8bM) ---- ## Runtime PM, devices ---- ### Runtime PM - [Adding Runtime Power Management Capabilities to Device Drivers - Shreeya Patel, Collabora](https://youtu.be/L_pNP9LkTOk) - [SAN19-421 Training: Device power management for idle](https://youtu.be/wbG1rXibzMY) - [BKK19-119 - Device power management and idle](https://youtu.be/LaFartS_dv0) - [LPC2019 - Integration of PM-runtime with System-wide Power Management](https://youtu.be/5GXjQsnH8H8) - [The Fall of the Legacy - Vaibhav Gupta, Open Source Contributor](https://youtu.be/MAxzhurvDTw) ---- ### PM Domain (`genpd`) - [Kernel Recipes 2017 - Overview of Generic PM Domains (genpd) - Kevin Hilman](https://youtu.be/SctfvoskABM) - [The Case for an SoC Power Management Driver - Stephen Boyd, Google](https://youtu.be/sN4krurp8bM) - [Adding Runtime Power Management Capabilities to Device Drivers - Shreeya Patel, Collabora](https://youtu.be/L_pNP9LkTOk) - [SAN19-421 Training: Device power management for idle](https://youtu.be/wbG1rXibzMY) - [*Active state management of power domains*](https://lwn.net/Articles/744047/) ---- ### Device Link - [Kernel Recipes 2019 - What To Do When Your Device Depends on Another One](https://youtu.be/Nkh-EDGD8HM) ---- ### DVFS - [LLC 2022 - Interconnect and Devfreq on i.MX - Bus Dynamic Frequency Scaling, by Abel Vesa](https://youtu.be/55rEyDBhjdQ) ---- ## CPU Runtime ---- ### cpufreq - [SUSE Labs Conference 2020 - The schedutil frequency governor: current status and performance](https://youtu.be/OPWoj_xgkBA) - [Kernel modification: Adding Governors](https://youtu.be/P8Qhy7lgI_A) - [Advances in CPU Frequency Management](https://youtu.be/55Zlt5efcJQ) - [LinuxDays 2018 - Frequency scaling governor for the Linux kernel - Giovanni Gherdovich](https://youtu.be/b-RrZi2AHXs) - [LinuxDays 2017 - CPU Frequency Scaling in Linux - Giovanni Gherdovich](https://youtu.be/uZkl8TdzNQo) ---- ### OPP - [*Operating Performance Points (OPP) Library*](https://docs.kernel.org/power/opp.html) in Linux Kernel Documentation. - [Power management techniques on embedded Linux (21:50)](https://youtu.be/DJDrfsSgqO0?si=y6G5AU3j15Q3MHK-&t=1310) ---- ## CPUIdle ---- ### CPUIdle - [[ENG] Rafael J. Wysocki: "Advances in CPU Idle Time Management in Linux" / #LinuxPiter](https://youtu.be/vh2_xkCnwhI) ---- ## ACPI Power States ---- ### S States - [Arch4001 07 Power Transition 01 Intro 01 Intr](https://youtu.be/YZ_1Ec_zBYw) - [Computer Architecture: CPU ACPI Power Management lecture 1](https://youtu.be/JJOrrF41wP8) - [Improving monitoring of power saving states - Mr Stanislaw Kardach (Google), Sven van Ashbrook](https://youtu.be/VSfkQ9DcPqI) ---- ### P States - [07 - OSPM 2024 - Rafael J. Wysocki, Intel - Energy Models and Intel chips](https://youtu.be/moRrI6d4TZU) - [A New CPU Frequency Control Mechanism on Linux - Ray Huang, AMD](https://youtu.be/55Jf4eeWrOw) - [Power Capping Linux - Srinivas Pandruvada, Intel](https://youtu.be/1Rl8PyuK6yA) ---- ### C States 1. [CPU idle power saving methods for real-time workloads](https://wiki.linuxfoundation.org/realtime/documentation/howto/applications/cpuidle) on Linux Foundation Wiki 2. [Excerpt of *Energy Efficient Servers: Blueprints for Data Center Optimization*](https://books.google.com.tw/books?id=DFAnCgAAQBAJ&pg=PA176) 3. [Tuning Linux for Performance - I Wanna Go Fast! - Anthony Nocentino - PSConfEU 2023](https://youtu.be/RMtyLCQLHzE) 4. [Tuning RT Kernel to Improve Schedule Performance with Intel Platform - Junxiao Chang, Intel](https://youtu.be/wKuS8DazCOY) ---- ### S0ix 1. The [S0ixSelftestTool](https://github.com/intel/S0ixSelftestTool) 2. [*PCH S0 Low Power*](https://edc.intel.com/content/www/tw/zh/design/ipla/software-development-platforms/client/platforms/tiger-lake-mobile-y/intel-500-series-chipset-family-on-package-platform-controller-hub-datasheet-v/006/pch-s0-low-power/) 3. [*Power Management Sub-state*](https://edc.intel.com/content/www/tw/zh/design/ipla/software-development-platforms/client/platforms/tiger-lake-mobile-y/intel-500-series-chipset-family-on-package-platform-controller-hub-datasheet-v/006/power-management-sub-state/) 4. [*Prepare hardware for modern standby*](https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/prepare-hardware-for-modern-standby) on the Windows documentation. 5. Descriptions on the [ChromeOS documentation](https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/debugd/docs/log_entries.md#substate_live_status_registers) 6. [Host and Guest Suspend Under Xen - S3 and S0ix - Marek Marczykowski-Górecki, Invisible Things Lab](https://youtu.be/4UUEt4rll6U) ---- ## Other Frameworks ---- ### PM QoS - [CPU Power Saving Methods for Real-time Workloads - Ramesh Thomas, Intel](https://youtu.be/L_pNP9LkTOk) ---- ## Thermal Management ---- ### Thermal Subsystem - [Improvisation and Demonstration of Linux Thermal Framework for Multiple Temperature Sensors](https://youtu.be/e7SMigJV8ho) - [LVC20 110 Skin temperature management with hierarchical constraints](https://youtu.be/c0Oo8CotYYM) ---- ### `thermald` - [`thermald`](https://github.com/intel/thermal_daemon) --- # Graphic ---- ## Display Interfaces ---- ### VGA - [M14 - 3 - Basic Operation of a CRT Monitor](https://youtu.be/G94-uuFtKIo) - [M14 - 4 - VGA - Horizontal Synchronization](https://youtu.be/hAuxN45Ski8) - [M14 - 5 - VGA - Vertical Synchronization](https://youtu.be/l8qrQXTiPCc) - [M14 - 6 - VGA - Pixel Clock Rate](https://youtu.be/W1PrPJs7K-I) - [Nandland Go Board Project 9 - Introduction to VGA](https://youtu.be/7wjTJivsNMM) ---- ### RGB - [pico-rgb2hmi - video converter - Marcelo Lorenzati - Commodore Users Europe - 17th of Sep. 2022](https://youtu.be/S9WqXhF75WE) - [Image interfaces in LCD modules explanation - LVDS, RGB, MIPI, Vx1, eDP interfaces explanation](https://youtu.be/M3k3wNdOrd4) ---- ### LVDS - [*LVDS Display Panel*](https://www.kernel.org/doc/Documentation/devicetree/bindings/display/panel/panel-lvds.txt) - [Video signal transmission between motherboard and Tcon via LVDS. VESA and JEIDA standard](https://youtu.be/ca5i_GZ9lds) - [Testing and Remote Access to Embedded System DPI/LVDS Display Output - Marek Vasut](https://youtu.be/ncnM8K6A1l4) - [What is LVDS ... Old laptop Screen reuse](https://youtu.be/Gph9hYLPMFk) ---- ### DPI - [Testing and Remote Access to Embedded System DPI/LVDS Display Output - Marek Vasut](https://youtu.be/ncnM8K6A1l4) ---- ### HDMI - [Display support on Embedded Systems: Linux implementation & limitations (Neil Armstrong, Linaro)](https://youtu.be/pHaUQsByb5M) - [HDMI 4k Video: Lessons Learned - Hans Verkuil, Cisco Systems Norway](https://youtu.be/c74Gya5bhNU) - [HDMI CEC: What? Why? How?](https://youtu.be/Q6S2FabX2WA) ---- ### DisplayPort - [What is DisplayPort (DP)?](https://youtu.be/GioTwL2SoVw) - [TI Precision Labs - Video Interface: Understanding DP Link Training](https://youtu.be/q6sTsT-Yrmk) - [Essentials of DisplayPort Protocols at HBR3 8.1 Gb/s Link Rates](https://youtu.be/-Lq9fDDEAY8) - [Display support on Embedded Systems: Linux implementation & limitations (Neil Armstrong, Linaro)](https://youtu.be/pHaUQsByb5M) - [A Journey through Upstream Atomic KMS to Achieve DP Compliance - Manasi Navare, Intel](https://youtu.be/-o-r2KRirYs) ---- ### DP MST - [XDC 2022 | Introduction to DisplayPort MST support on Linux | Lyude Paul](https://youtu.be/QVlD-x_j4vU) - [XDC 2022 Demo | Progress of MST improvement from AMD | Wayne Lin](https://youtu.be/XgtZnRRAOAY) ---- ### EDID - [Extended Display Identification Data (EDID): Problems, Pitfalls and Complications - Hans Verkuil](https://youtu.be/IQlCGC_zSCE) ---- ## KMS ---- ### Display Pipeline - [ELCE 2022: Navigating the Linux Graphics Stack](https://youtu.be/WaF7mVhnhtE) - [Walking Through the Linux-Based Graphics Stack - Paul Kocialkowski, Bootlin](https://youtu.be/lEUCgGLZYo8) - [Graphics: A Frame's Journey | FOSDEM 2023](https://youtu.be/5aVPhBONhEM) - [*An introduction to the Linux graphics stack*](https://flusp.ime.usp.br/blogs,/kernel-graphics/an_introduction_to_the_linux_graphics_stack/) - [*The Linux graphics stack in a nutshell, part 1*](https://lwn.net/Articles/955376/) - [*The Linux graphics stack in a nutshell, part 2*](https://lwn.net/Articles/955708) - [*DRM KMS overview*](https://wiki.st.com/stm32mpu/wiki/DRM_KMS_overview) ---- ### KMS (Recent) - [Getting pixels on screen on Linux: introduction to Kernel Mode Setting - Simon Ser](https://youtu.be/haes4_Xnc5Q) - [A Current Overview of the DRM KMS Driver-Side APIs - Paul Kocialkowski, Bootlin](https://youtu.be/nNY7NjUIJRA) - [ELCE 2022: Navigating the Linux Graphics Stack](https://youtu.be/WaF7mVhnhtE) - [Graphics: A Frame's Journey | FOSDEM 2023](https://youtu.be/5aVPhBONhEM) ---- ### KMS (Old, but good!) - [Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard](https://youtu.be/LbDOCJcDRoo) - [Kernel Recipes 2015 - Anatomy of an Atomic KMS Driver - by Laurent Pinchart](https://youtu.be/lihqR9sENpc) - [XDC 2019 | A case study on frame presentation from user space via KMS - Heinrich Fink](https://youtu.be/xRXuYyTZCdA) - [LVC21F-108 Advanced KMS](https://youtu.be/ZRq7pQu_OGs) - [Demystifying Linux MIPI DSI Subsystem - Jagan Teki, Amarula Solutions](https://youtu.be/UG7tMZM24UU) - [Embedded Linux Conference 2013 - Anatomy of an Embedded KMS Driver](https://youtu.be/Ja8fM7rTae4) - [Linux DRM: New Picture Processing API](https://youtu.be/z17CUitaQpE) ---- ### KMS (Links) - [*DRM KMS overview*](https://wiki.st.com/stm32mpu/wiki/DRM_KMS_overview) on ST wiki - [*Kernel Mode Setting (KMS)*](https://www.kernel.org/doc/html/latest/gpu/drm-kms.html) in Linux kernel documentation. - [*Display Driver Stack*](https://docs.amd.com/r/en-US/ug1432-vmk180-trd/Display) from AMD. - [*DRM/KMS Kernel Subsystem*](https://docs.amd.com/r/en-US/ug1442-vck190-base-trd/DRM/KMS-Kernel-Subsystem) also from AMD. ---- ### Atomic KMS - [Kernel Locking Engineering - Daniel Vetter, Intel](https://youtu.be/LPH3MUw9m0o&t=2176) - ["Everything Awesome about GPU Drivers" - Daniel Vetter (LCA 2020) (04:41)](https://youtu.be/Kkv0Su0OMq0?si=zEWszAsXB2NKiLdm&t=280) - [FOSDEM 2015 | Atomic Mode-Setting](https://youtu.be/9P_3Y2wB8us) - [A Journey through Upstream Atomic KMS to Achieve DP Compliance - Manasi Navare, Intel](https://youtu.be/-o-r2KRirYs) - [XDC2015 - Daniel Vetter - Atomic Modesetting for Drivers](https://youtu.be/kl9suFgbTc8) - [XDC 2019 | Enabling 8K displays - A story of 33M pixels, 2 CRTCs and no Tears! - Manasi Navare](https://youtu.be/OJ20hlnWraw) ---- ### Atomic KMS (Links) - [*Atomic mode setting design overview, part 1*](https://lwn.net/Articles/653071/) - [*Atomic mode setting design overview, part 2*](https://lwn.net/Articles/653466/) - [*Atomic KMS/DRM on multiple displays is hindered by driver-global serialization of atomic commits*](https://github.com/raspberrypi/linux/issues/5094) ---- ### KMS Bridges - [*Diving deep into Linux DRM bridge chaining*](https://blog.3mdeb.com/2024/2024-02-12-drm-bridge-chaining/) - [Linux DRM Bridge: A Potential Replacer for the DRM Encoder to Standardise a Single API? | Jagan Teki](https://youtu.be/rgePZQd5y7w) - [Standardising Linux DRM driver implementations by interfacing DRM Bridge as a single API](https://youtu.be/IVI30LzPzAA) - [XDC 2022 | Runtime display switch implementation in a Linux DRM bridge subsystem | Jagan Teki](https://youtu.be/PoYdP9fPn-4) - [LVC21F-223 Demystifying Linux MIPI DSI Bridge Subsystem](https://youtu.be/7qURSnXKahE) ---- ## Sample Drivers ---- ### VKMS - [XDC 2023 | October 18 | Status Update of the VKMS DRM driver | Maíra Canal and Melissa Wen](https://youtu.be/HJtvbztr0Is) - [XDC 2021 | Emulating Virtual Hardware in VKMS | Sumera Priyadarsini](https://youtu.be/LP0Gbt8dUfA) - [Rodrigo Siqueira & Haneen Mohamed - VKMS](https://youtu.be/ber_9vkj_-U) - [XDC 2020 | VKMS improvements using IGT GPU Tools](https://youtu.be/EbfIdK4IsP0) ---- ### simpledrm - [Trading fbdev for DRM, No Returns Accepted - Geert Uytterhoeven, Glider bv](https://youtu.be/9a9IJQJf8PQ) - [openSUSE Conference 2022 - simpledrm - a kernel fbdev replacement](https://youtu.be/laFx6RQ3XJ4) - [Modern Graphics from Boot to Shutdown and Retiring fbdev](https://youtu.be/WbAVXl2pUdc) ---- ## Rendering Pipeline ---- ### Rendering Pipeline - [The Linux 3D graphics stack with Alyssa Rosenzweig](https://youtu.be/0F0aQ2eympI) - [Open Source Graphics 101: Getting Started - Boris Brezillon, Collabora](https://youtu.be/HJoLVpPdJ70) - [Thomas Zimmermann The Linux Graphics Stack in a Nutshell](https://youtu.be/RCbxOZ9qYBw) ---- ### DRM (Rendering) - [I want to make a GPU (Playlist)](https://youtube.com/playlist?list=PL980gcR1LE3IwpeihtCRVFK6maXqBb6AN) - [Overview of a Modern DRM Driver - Matt Coster, Imagination Technologies](https://youtu.be/-Eqjpb5Sca0) - [XDC 2023 | October 19 | With great power comes less responsibility | B. Brezillon, D. Krummrich](https://youtu.be/XW17QRDU1es) - [Everything Great about Upstream Graphics - Daniel Vetter, Intel](https://youtu.be/kVzHOgt6WGE) - [Why Are GPUs (Not) Fast - A Trip Through the Driver Stack - Lucas Stach, Pengutronix](https://youtu.be/LzleI6t29fM) - [Mesa3D Unveiled: From glDrawArrays to GPU Magic - Christian Gmeiner, Igalia](https://youtu.be/goBmAwmuNNY) ---- ## User Space Components ---- ### libdrm - [Getting pixels on screen on Linux: introduction to Kernel Mode Setting - Simon Ser](https://youtu.be/haes4_Xnc5Q) ---- ### Wayland Protocol - [Why YOU should write a Wayland compositor – Victoria Brekenfeld – HiP22 Berlin](https://youtu.be/FUif2GxwgBc) ---- ### Mutter - [A Look Inside Mutter / Gnome Shell](https://www.youtube.com/live/4RZhTRZYb8I?feature=shared&t=3311) ---- ### Mesa - [Mesa3D Unveiled: From glDrawArrays to GPU Magic - Christian Gmeiner, Igalia](https://youtu.be/goBmAwmuNNY) - [Embedded Graphics Drivers in Mesa - Neil Roberts, Igalia](https://youtu.be/sgMCWbenjds) - [Linux Graphics 101 - Rohan Garg](https://youtu.be/9STbHrrHpDw) ---- ### libinput - ["Write a single library to handle all input devices, it'll be easy" they said...](https://youtu.be/HllUoT_WE7Y) ---- ## Tooling ---- ### DRM-CI - [Quickly Test Your Kernel with GitLab CI - Helen Koike, Collabora](https://youtu.be/AUHUONWYTPw) - [Automated testing of the DRM subsystem](https://www.kernel.org/doc/html/next/gpu/automated_testing.html#how-to-enable-automated-testing-on-your-tree) - [DRM-CI: A GitLab-CI pipeline for Linux kernel testing](https://www.collabora.com/news-and-blog/blog/2024/02/08/drm-ci-a-gitlab-ci-pipeline-for-linux-kernel-testing/) ---- ### IGT GPU Tools - [drm/igt-gpu-tools](https://gitlab.freedesktop.org/drm/igt-gpu-tools) - [XDC 2020 | VKMS improvements using IGT GPU Tools](https://youtu.be/EbfIdK4IsP0) - [IGT GPU Tools - the past, the present, the future](https://youtu.be/XcwHgeoEJd4) ---- ### KUnit - [XDC 2023 | October 17 | Status of KUnit tests on DRM subsystem | Arthur Grillo, Carlos Gallo Filho](https://youtu.be/NBivOyATgw0) - [XDC 2022 | KUnit sorcery and the uncanny nature of FPU in the DRM | I. Basso & M. Canal & M. Lemes](https://youtu.be/nbRbM-Ld-44) ---- ### apitrace - [apitrace/apitrace](https://github.com/apitrace/apitrace) - [v3dv: experience using gfxreconstruct/apitrace traces for performance evaluation](https://youtu.be/c7AhB2suams) - [Graphics Performance Analysis with FrameRetrace: A Responsive UI for ApiTrace - Mark Janes, Intel](https://youtu.be/q-5YkK3dGtI) - [Measuring and Improving OpenGL Performance](https://youtu.be/P3Uz3ULjrnc) --- # Camera (WIP) --- # Audio (WIP) --- # Storage (WIP) --- # Network (WIP) --- # Virtualization (WIP) --- # Booting (WIP)
{"slideOptions":"{\"theme\":\"solarized\",\"transition\":\"fade\"}","title":"Kernel Subsystem Pocket Index","description":"Kernel Bookmarks","contributors":"[{\"id\":\"7787164b-790f-48d8-8d75-16daa9b2a6a9\",\"add\":146439,\"del\":77914}]"}
    1105 views