sched/fair: Move max_cfs_quota_period decl and default_cfs_period() def from fair.c to sched.h
max_cfs_quota_period is defined in core.c but has a declaration in fair.c. Move the declaration to kernel/sched/sched.h. Also, move default_cfs_period() from fair.c to sched.h. No functional changes. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20250614012346.2358261-2-tj@kernel.org
This commit is contained in:
committed by
Peter Zijlstra
parent
dabe1be4e8
commit
d403a3689a
@@ -5617,15 +5617,6 @@ void cfs_bandwidth_usage_inc(void) {}
|
|||||||
void cfs_bandwidth_usage_dec(void) {}
|
void cfs_bandwidth_usage_dec(void) {}
|
||||||
#endif /* !CONFIG_JUMP_LABEL */
|
#endif /* !CONFIG_JUMP_LABEL */
|
||||||
|
|
||||||
/*
|
|
||||||
* default period for cfs group bandwidth.
|
|
||||||
* default: 0.1s, units: nanoseconds
|
|
||||||
*/
|
|
||||||
static inline u64 default_cfs_period(void)
|
|
||||||
{
|
|
||||||
return 100000000ULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline u64 sched_cfs_bandwidth_slice(void)
|
static inline u64 sched_cfs_bandwidth_slice(void)
|
||||||
{
|
{
|
||||||
return (u64)sysctl_sched_cfs_bandwidth_slice * NSEC_PER_USEC;
|
return (u64)sysctl_sched_cfs_bandwidth_slice * NSEC_PER_USEC;
|
||||||
@@ -6405,8 +6396,6 @@ static enum hrtimer_restart sched_cfs_slack_timer(struct hrtimer *timer)
|
|||||||
return HRTIMER_NORESTART;
|
return HRTIMER_NORESTART;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern const u64 max_cfs_quota_period;
|
|
||||||
|
|
||||||
static enum hrtimer_restart sched_cfs_period_timer(struct hrtimer *timer)
|
static enum hrtimer_restart sched_cfs_period_timer(struct hrtimer *timer)
|
||||||
{
|
{
|
||||||
struct cfs_bandwidth *cfs_b =
|
struct cfs_bandwidth *cfs_b =
|
||||||
|
|||||||
@@ -402,6 +402,19 @@ static inline bool dl_server_active(struct sched_dl_entity *dl_se)
|
|||||||
|
|
||||||
extern struct list_head task_groups;
|
extern struct list_head task_groups;
|
||||||
|
|
||||||
|
#ifdef CONFIG_CFS_BANDWIDTH
|
||||||
|
extern const u64 max_cfs_quota_period;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* default period for cfs group bandwidth.
|
||||||
|
* default: 0.1s, units: nanoseconds
|
||||||
|
*/
|
||||||
|
static inline u64 default_cfs_period(void)
|
||||||
|
{
|
||||||
|
return 100000000ULL;
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_CFS_BANDWIDTH */
|
||||||
|
|
||||||
struct cfs_bandwidth {
|
struct cfs_bandwidth {
|
||||||
#ifdef CONFIG_CFS_BANDWIDTH
|
#ifdef CONFIG_CFS_BANDWIDTH
|
||||||
raw_spinlock_t lock;
|
raw_spinlock_t lock;
|
||||||
|
|||||||
Reference in New Issue
Block a user