Skip to content
Commit bb560efd authored by Tejun Heo's avatar Tejun Heo Committed by Paul Gortmaker
Browse files

Revert "cgroup: Add memory barriers to plug cgroup_rstat_updated() race window"



commit d8ef4b38 upstream.

This reverts commit 9a9e97b2 ("cgroup: Add memory barriers to plug
cgroup_rstat_updated() race window").

The commit was added in anticipation of memcg rstat conversion which needed
synchronous accounting for the event counters (e.g. oom kill count). However,
the conversion didn't get merged due to percpu memory overhead concern which
couldn't be addressed at the time.

Unfortunately, the patch's addition of smp_mb() to cgroup_rstat_updated()
meant that every scheduling event now had to go through an additional full
barrier and Mel Gorman noticed it as 1% regression in netperf UDP_STREAM test.

There's no need to have this barrier in tree now and even if we need
synchronous accounting in the future, the right thing to do is separating that
out to a separate function so that hot paths which don't care about
synchronous behavior don't have to pay the overhead of the full barrier. Let's
revert.

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Reported-by: default avatarMel Gorman <mgorman@techsingularity.net>
Link: http://lkml.kernel.org/r/20200409154413.GK3818@techsingularity.net


Cc: v4.18+
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 4bc9d81a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment