include/linux/flex_proportions.h
Source file repositories/reference/linux-study-clean/include/linux/flex_proportions.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/flex_proportions.h- Extension
.h- Size
- 2023 bytes
- Lines
- 73
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/percpu_counter.hlinux/spinlock.hlinux/seqlock.hlinux/gfp.h
Detected Declarations
struct fprop_globalstruct fprop_local_percpufunction fprop_inc_percpu
Annotated Snippet
struct fprop_global {
/* Number of events in the current period */
struct percpu_counter events;
/* Current period */
unsigned int period;
/* Synchronization with period transitions */
seqcount_t sequence;
};
int fprop_global_init(struct fprop_global *p, gfp_t gfp);
void fprop_global_destroy(struct fprop_global *p);
bool fprop_new_period(struct fprop_global *p, int periods);
/*
* ---- PERCPU ----
*/
struct fprop_local_percpu {
/* the local events counter */
struct percpu_counter events;
/* Period in which we last updated events */
unsigned int period;
raw_spinlock_t lock; /* Protect period and numerator */
};
int fprop_local_init_percpu(struct fprop_local_percpu *pl, gfp_t gfp);
void fprop_local_destroy_percpu(struct fprop_local_percpu *pl);
void __fprop_add_percpu(struct fprop_global *p, struct fprop_local_percpu *pl,
long nr);
void __fprop_add_percpu_max(struct fprop_global *p,
struct fprop_local_percpu *pl, int max_frac, long nr);
void fprop_fraction_percpu(struct fprop_global *p,
struct fprop_local_percpu *pl, unsigned long *numerator,
unsigned long *denominator);
static inline
void fprop_inc_percpu(struct fprop_global *p, struct fprop_local_percpu *pl)
{
unsigned long flags;
local_irq_save(flags);
__fprop_add_percpu(p, pl, 1);
local_irq_restore(flags);
}
#endif
Annotation
- Immediate include surface: `linux/percpu_counter.h`, `linux/spinlock.h`, `linux/seqlock.h`, `linux/gfp.h`.
- Detected declarations: `struct fprop_global`, `struct fprop_local_percpu`, `function fprop_inc_percpu`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.