lib/test_rhashtable.c
Source file repositories/reference/linux-study-clean/lib/test_rhashtable.c
File Facts
- System
- Linux kernel
- Corpus path
lib/test_rhashtable.c- Extension
.c- Size
- 21995 bytes
- Lines
- 891
- Domain
- Kernel Services
- Bucket
- lib
- Inferred role
- Kernel Services: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/init.hlinux/jhash.hlinux/kernel.hlinux/kthread.hlinux/module.hlinux/rcupdate.hlinux/rcupdate_wait.hlinux/rhashtable.hlinux/slab.hlinux/sched.hlinux/random.hlinux/vmalloc.hlinux/wait.h
Detected Declarations
struct test_obj_valstruct test_objstruct test_obj_rhlstruct thread_datafunction my_hashfnfunction my_cmpfnfunction insert_retryfunction test_rht_lookupfunction test_bucket_statsfunction test_rhashtablefunction test_rhltablefunction rhl_for_each_entry_rcufunction rhl_for_each_entry_rcufunction test_rhashtable_maxfunction print_htfunction test_insert_dupfunction test_insert_duplicates_runfunction thread_lookup_testfunction threadfuncfunction test_rhashtable_next_keyfunction test_rht_initfunction test_rht_exitmodule init test_rht_init
Annotated Snippet
module_init(test_rht_init);
module_exit(test_rht_exit);
MODULE_DESCRIPTION("Resizable, Scalable, Concurrent Hash Table test module");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/init.h`, `linux/jhash.h`, `linux/kernel.h`, `linux/kthread.h`, `linux/module.h`, `linux/rcupdate.h`, `linux/rcupdate_wait.h`, `linux/rhashtable.h`.
- Detected declarations: `struct test_obj_val`, `struct test_obj`, `struct test_obj_rhl`, `struct thread_data`, `function my_hashfn`, `function my_cmpfn`, `function insert_retry`, `function test_rht_lookup`, `function test_bucket_stats`, `function test_rhashtable`.
- Atlas domain: Kernel Services / lib.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.