lkml.org 
[lkml]   [2020]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Cgroup memory barrier usage and call frequency from scheduler
On Thu, Apr 09, 2020 at 06:49:19PM +0200, Peter Zijlstra wrote:
> On Thu, Apr 09, 2020 at 04:44:13PM +0100, Mel Gorman wrote:
>
> > For 1, the use of a full barrier seems unnecessary when it appears that
> > you could have used a read barrier and a write barrier. The following
> > patch drops the profile overhead to 0.1%
>
> Yikes. And why still .1% the below should be a barrier() on x86. Is the
> compiler so contrained by that?
>

The 0.1% is still doing all the work up until just after the barrier with
this check;

if (cgroup_rstat_cpu(cgrp, cpu)->updated_next)
return;

That must often be true as samples were not gathered in the rest of the
function. As this function is called on every update_curr(), it gets
called a lot.

--
Mel Gorman
SUSE Labs

\
 
 \ /
  Last update: 2020-04-09 19:21    [W:0.291 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site