Skip to content

Commit 88c9f0a

Browse files
author
CKI KWF Bot
committed
Merge: cgroup/rstat: avoid disabling irqs for O(num_cpu)
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/6931 Backporting upstream patch `cgroup/rstat: avoid disabling irqs for O(num_cpu)` to help address performance degradation issues. JIRA: https://issues.redhat.com/browse/RHEL-94298 Signed-off-by: Radostin Stoyanov <rstoyano@redhat.com> Approved-by: Herton R. Krzesinski <herton@redhat.com> Approved-by: Waiman Long <longman@redhat.com> Approved-by: Phil Auld <pauld@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 986968f + d2138c1 commit 88c9f0a

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

kernel/cgroup/rstat.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -323,13 +323,11 @@ static void cgroup_rstat_flush_locked(struct cgroup *cgrp)
323323
rcu_read_unlock();
324324
}
325325

326-
/* play nice and yield if necessary */
327-
if (need_resched() || spin_needbreak(&cgroup_rstat_lock)) {
328-
__cgroup_rstat_unlock(cgrp, cpu);
329-
if (!cond_resched())
330-
cpu_relax();
331-
__cgroup_rstat_lock(cgrp, cpu);
332-
}
326+
/* play nice and avoid disabling interrupts for a long time */
327+
__cgroup_rstat_unlock(cgrp, cpu);
328+
if (!cond_resched())
329+
cpu_relax();
330+
__cgroup_rstat_lock(cgrp, cpu);
333331
}
334332
}
335333

0 commit comments

Comments
 (0)