Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753791AbcKRQmy (ORCPT ); Fri, 18 Nov 2016 11:42:54 -0500 Received: from smtprelay0232.hostedemail.com ([216.40.44.232]:60794 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753760AbcKRQmx (ORCPT ); Fri, 18 Nov 2016 11:42:53 -0500 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1539:1593:1594:1711:1714:1730:1747:1777:1792:2393:2553:2559:2562:3138:3139:3140:3141:3142:3350:3622:3867:3874:5007:6120:6261:7875:10004:10400:10848:10967:11026:11232:11473:11658:11914:12043:12296:12740:12760:13069:13311:13357:13439:14181:14659:14721:21080:30054:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: straw20_35c4d20cf2c22 X-Filterd-Recvd-Size: 1901 Date: Fri, 18 Nov 2016 11:42:48 -0500 From: Steven Rostedt To: Peter Zijlstra Cc: luca abeni , Daniel Bristot de Oliveira , linux-kernel@vger.kernel.org, Ingo Molnar , Juri Lelli , Claudio Scordino Subject: Re: [RFC v3 1/6] Track the active utilisation Message-ID: <20161118114248.29c88568@gandalf.local.home> In-Reply-To: <20161118142359.GK3142@twins.programming.kicks-ass.net> References: <1477317998-7487-1-git-send-email-luca.abeni@unitn.it> <1477317998-7487-2-git-send-email-luca.abeni@unitn.it> <20161025112916.67eb245c@utopia> <20161025095811.50a5856a@gandalf.local.home> <20161118142359.GK3142@twins.programming.kicks-ass.net> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 626 Lines: 28 On Fri, 18 Nov 2016 15:23:59 +0100 Peter Zijlstra wrote: > That said; there's something to be said for: > > u64 running_bw; > > static void add_running_bw(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq) > { > u64 old = dl_rq->running_bw; > > dl_rq->running_bw += dl_se->dl_bw; > SCHED_WARN_ON(dl_rq->running_bw < old); /* overflow */ > } > > static void sub_running_bw(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq) > { > u64 old = dl_rq->running_bw; > > dl_rq->running_bw -= dl_se->dl_bw; > SCHED_WARN_ON(dl_rq->running_bw > old); /* underflow */ > } > Acked-by: me -- Steve