lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170501191113.GD8921@htj.duckdns.org>
Date:   Mon, 1 May 2017 15:11:13 -0400
From:   Tejun Heo <tj@...nel.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Ingo Molnar <mingo@...hat.com>,
        “linux-kernel@...r.kernel.org” 
        <linux-kernel@...r.kernel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Mike Galbraith <efault@....de>, Paul Turner <pjt@...gle.com>,
        Chris Mason <clm@...com>,
        “kernel-team@...com” <kernel-team@...com>
Subject: Re: [2/2] sched/fair: Fix O(# total cgroups) in load balance path

Hello, Peter.

On Mon, May 01, 2017 at 06:11:58PM +0200, Peter Zijlstra wrote:
> On Tue, Apr 25, 2017 at 05:43:50PM -0700, Tejun Heo wrote:
> > @@ -7007,6 +7008,14 @@ static void update_blocked_averages(int
> >  		se = cfs_rq->tg->se[cpu];
> >  		if (se && !skip_blocked_update(se))
> >  			update_load_avg(se, 0);
> > +
> > +		/*
> > +		 * There can be a lot of idle CPU cgroups.  Don't let fully
> > +		 * decayed cfs_rqs linger on the list.
> > +		 */
> > +		if (!cfs_rq->load.weight && !cfs_rq->avg.load_sum &&
> > +		    !cfs_rq->avg.util_sum && !cfs_rq->runnable_load_sum)
> > +			list_del_leaf_cfs_rq(cfs_rq);
> >  	}
> >  	rq_unlock_irqrestore(rq, &rf);
> >  }
> 
> Right this is a 'known' issue and we recently talked about this.
> 
> I think you got the condition right, we want to wait for all the stuff
> to be decayed out before taking it off the list.
> 
> The only 'problem', which Vincent mentioned in that other thread, is that
> NOHZ idle doesn't guarantee decay -- then again, you don't want to go
> wake a CPU just to decay this crud either. And if we're idle, the list
> being long doesn't matter either.

The list staying long is fine as long as nobody walks it; however, the
list can be *really* long, e.g. hundreds of thousands long, so walking
it repeatedly won't be a good idea even if the system is idle.  As
long as NOHZ decays and trims the list when it ends up walking the
list, and AFAICS it does, it should be fine.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ