diff options
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r-- | kernel/sched/fair.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index ce60006132b1..54e85898c390 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
@@ -2029,13 +2029,14 @@ static inline bool cfs_bandwidth_used(void) | |||
2029 | return static_key_false(&__cfs_bandwidth_used); | 2029 | return static_key_false(&__cfs_bandwidth_used); |
2030 | } | 2030 | } |
2031 | 2031 | ||
2032 | void account_cfs_bandwidth_used(int enabled, int was_enabled) | 2032 | void cfs_bandwidth_usage_inc(void) |
2033 | { | 2033 | { |
2034 | /* only need to count groups transitioning between enabled/!enabled */ | 2034 | static_key_slow_inc(&__cfs_bandwidth_used); |
2035 | if (enabled && !was_enabled) | 2035 | } |
2036 | static_key_slow_inc(&__cfs_bandwidth_used); | 2036 | |
2037 | else if (!enabled && was_enabled) | 2037 | void cfs_bandwidth_usage_dec(void) |
2038 | static_key_slow_dec(&__cfs_bandwidth_used); | 2038 | { |
2039 | static_key_slow_dec(&__cfs_bandwidth_used); | ||
2039 | } | 2040 | } |
2040 | #else /* HAVE_JUMP_LABEL */ | 2041 | #else /* HAVE_JUMP_LABEL */ |
2041 | static bool cfs_bandwidth_used(void) | 2042 | static bool cfs_bandwidth_used(void) |
@@ -2043,7 +2044,8 @@ static bool cfs_bandwidth_used(void) | |||
2043 | return true; | 2044 | return true; |
2044 | } | 2045 | } |
2045 | 2046 | ||
2046 | void account_cfs_bandwidth_used(int enabled, int was_enabled) {} | 2047 | void cfs_bandwidth_usage_inc(void) {} |
2048 | void cfs_bandwidth_usage_dec(void) {} | ||
2047 | #endif /* HAVE_JUMP_LABEL */ | 2049 | #endif /* HAVE_JUMP_LABEL */ |
2048 | 2050 | ||
2049 | /* | 2051 | /* |