lkml.org 
[lkml]   [2021]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -next v3] sched: Dec cfs_bandwidth_used in destroy_cfs_bandwidth()
On Fri, Jul 16, 2021 at 10:27:56AM +0800, Zhang Qiao wrote:
> cfs_bandwidth_used is a static_key to control cfs bandwidth
> feature. When adding a cfs_bandwidth group, we need increase
> the key, and decrease it when removing. But currently when we
> remove a cfs bandwidth group, we don't decrease the key and
> this switch will always be on even if there is no cfs bandwidth
> group in the system.
>
> Fix the problem as two steps:
> 1.Rename cfs_bandwidth_usage_{dec, inc}() to
> cfs_bandwidth_usage_{dec,inc}_cpuslocked() and its caller need to
> hold the hotplug lock.
> 2.Add cfs_bandwidth_usage_dec() and its caller don't need
> to hold the hotplug lock. And when removing a cfs bandwidth group,
> we decrease cfs_bandwidth_used by calling cfs_bandwidth_usage_dec().
>
> Fixes: 56f570e512ee ("sched: use jump labels to reduce overhead when bandwidth control is inactive")
> Signed-off-by: Zhang Qiao <zhangqiao22@huawei.com>

Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>

\
 
 \ /
  Last update: 2021-07-16 15:54    [W:0.084 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site