Skip to content

Commit a8e7244

Browse files
committed
sched/fair: Move max_cfs_quota_period decl and default_cfs_period() def from fair.c to sched.h
JIRA: https://issues.redhat.com/browse/RHEL-110301 commit d403a36 Author: Tejun Heo <tj@kernel.org> Date: Fri Jun 13 15:23:27 2025 -1000 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 Signed-off-by: Phil Auld <pauld@redhat.com>
1 parent d6c2181 commit a8e7244

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

kernel/sched/fair.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5611,15 +5611,6 @@ void cfs_bandwidth_usage_inc(void) {}
56115611
void cfs_bandwidth_usage_dec(void) {}
56125612
#endif /* !CONFIG_JUMP_LABEL */
56135613

5614-
/*
5615-
* default period for cfs group bandwidth.
5616-
* default: 0.1s, units: nanoseconds
5617-
*/
5618-
static inline u64 default_cfs_period(void)
5619-
{
5620-
return 100000000ULL;
5621-
}
5622-
56235614
static inline u64 sched_cfs_bandwidth_slice(void)
56245615
{
56255616
return (u64)sysctl_sched_cfs_bandwidth_slice * NSEC_PER_USEC;
@@ -6394,8 +6385,6 @@ static enum hrtimer_restart sched_cfs_slack_timer(struct hrtimer *timer)
63946385
return HRTIMER_NORESTART;
63956386
}
63966387

6397-
extern const u64 max_cfs_quota_period;
6398-
63996388
static enum hrtimer_restart sched_cfs_period_timer(struct hrtimer *timer)
64006389
{
64016390
struct cfs_bandwidth *cfs_b =

kernel/sched/sched.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,19 @@ static inline bool dl_server_active(struct sched_dl_entity *dl_se)
403403

404404
extern struct list_head task_groups;
405405

406+
#ifdef CONFIG_CFS_BANDWIDTH
407+
extern const u64 max_cfs_quota_period;
408+
409+
/*
410+
* default period for cfs group bandwidth.
411+
* default: 0.1s, units: nanoseconds
412+
*/
413+
static inline u64 default_cfs_period(void)
414+
{
415+
return 100000000ULL;
416+
}
417+
#endif /* CONFIG_CFS_BANDWIDTH */
418+
406419
struct cfs_bandwidth {
407420
#ifdef CONFIG_CFS_BANDWIDTH
408421
raw_spinlock_t lock;

0 commit comments

Comments
 (0)