u/Extension_Count_8448

▲ 25 r/kernel

1 YOE in Linux Kernel. Struggling to build mental model of a large legacy driver. Is this normal?

Hi everyone,

I work as a Linux kernel developer at a large semicon. I have ~2 years of total exp with about 1 year in kernel development.

I'm working on a fairly large legacy driver where multiple years of fixes, features and hardware support have accumulated. Reading the code is often overwhelming because understanding one path requires tracing through device tree parsing, probe, private data initialization, IRQs, workqueues, callbacks, multiple execution contexts, etc.

I can usually understand individual pieces after spending enough time but I struggle to build and retain a complete mental model of the subsystem. During discussions with senior engineers, I keep forgetting the exact execution flow or where a particular structure (for ex, driver private data populated from DT/SoC information, IRQ calls that come from GIC and the flow afterwards) was initialized, even though I understood it while debugging.

Another issue I've identified is that when deadlines are tight, I tend to rely on LLMs to quickly understand the relevant code path so I can fix a bug or implement a feature. While this helps in the short term, I feel it's hurting my ability to deeply understand the codebase, so I'm trying to reduce that habit.

I'm curious:

- Is this a normal stage for someone with ~1 year of kernel experience?

- How do experienced kernel developers approach understanding large legacy drivers?

- Also how to develop patience to read the code for hours together ? I do love it when I understand a function or a call flow but I feel like the speed isn't enough and my patience to understand something in depth drops after digging in for sometime

I'd really appreciate any advice or habits that helped you early in your kernel career.

reddit.com
u/Extension_Count_8448 — 6 days ago