Intrusive Linked Lists
Summary
An in-depth guide to intrusive linked lists, showing how a list_head is embedded in the containing struct and how to compute the containing object’s address via offset and container_of. It covers Linux kernel usage, including initialization, insertion, and traversal macros, and explains why intrusive lists can reduce allocations and cache thrashing. It also explains how Linux uses task_struct and the task list to manage processes.