tools/testing/selftests/kvm/include/lru_gen_util.h
Source file repositories/reference/linux-study-clean/tools/testing/selftests/kvm/include/lru_gen_util.h
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/kvm/include/lru_gen_util.h- Extension
.h- Size
- 1457 bytes
- Lines
- 52
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
inttypes.hlimits.hstdlib.htest_util.h
Detected Declarations
struct generation_statsstruct node_statsstruct memcg_stats
Annotated Snippet
struct generation_stats {
int gen;
long age_ms;
long nr_anon;
long nr_file;
};
struct node_stats {
int node;
int nr_gens; /* Number of populated gens entries. */
struct generation_stats gens[MAX_NR_GENS];
};
struct memcg_stats {
unsigned long memcg_id;
int nr_nodes; /* Number of populated nodes entries. */
struct node_stats nodes[MAX_NR_NODES];
};
void lru_gen_read_memcg_stats(struct memcg_stats *stats, const char *memcg);
long lru_gen_sum_memcg_stats(const struct memcg_stats *stats);
long lru_gen_sum_memcg_stats_for_gen(int gen, const struct memcg_stats *stats);
void lru_gen_do_aging(struct memcg_stats *stats, const char *memcg);
int lru_gen_find_generation(const struct memcg_stats *stats,
unsigned long total_pages);
bool lru_gen_usable(void);
#endif /* SELFTEST_KVM_LRU_GEN_UTIL_H */
Annotation
- Immediate include surface: `inttypes.h`, `limits.h`, `stdlib.h`, `test_util.h`.
- Detected declarations: `struct generation_stats`, `struct node_stats`, `struct memcg_stats`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
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.