Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965459AbdCYCiq (ORCPT ); Fri, 24 Mar 2017 22:38:46 -0400 Received: from smtprelay0155.hostedemail.com ([216.40.44.155]:54717 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752051AbdCYCii (ORCPT ); Fri, 24 Mar 2017 22:38:38 -0400 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:1541:1593:1594:1711:1730:1747:1777:1792:2194:2199:2393:2553:2559:2562:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3872:3874:4250:5007:6120:6261:7875:9108:10004:10400:10848:10967:11026:11232:11658:11914:12043:12438:12555:12663:12740:12760:12895:13069:13161:13229:13311:13357:13439:14096:14097:14180:14181:14659:14721:21060:21080:21326:30054:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: road49_4a940fa24663b X-Filterd-Recvd-Size: 2781 Date: Fri, 24 Mar 2017 22:38:31 -0400 From: Steven Rostedt To: luca abeni Cc: Peter Zijlstra , linux-kernel@vger.kernel.org, Ingo Molnar , Juri Lelli , Claudio Scordino , Tommaso Cucinotta , Daniel Bristot de Oliveira , Joel Fernandes , Mathieu Poirier Subject: Re: [RFC v5 5/9] sched/deadline: do not reclaim the whole CPU bandwidth Message-ID: <20170324223831.5feb1cd9@grimm.local.home> In-Reply-To: <20170324225827.402a4f20@nowhere> References: <1490327582-4376-1-git-send-email-luca.abeni@santannapisa.it> <1490327582-4376-6-git-send-email-luca.abeni@santannapisa.it> <20170324140015.fptmmtqynvjy723q@hirez.programming.kicks-ass.net> <20170324225827.402a4f20@nowhere> X-Mailer: Claws Mail 3.14.1 (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: 1426 Lines: 41 On Fri, 24 Mar 2017 22:58:27 +0100 luca abeni wrote: > Hi Peter, > > On Fri, 24 Mar 2017 15:00:15 +0100 > Peter Zijlstra wrote: > > > On Fri, Mar 24, 2017 at 04:52:58AM +0100, luca abeni wrote: > > > > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > > > index 20c62e7..efa88eb 100644 > > > --- a/kernel/sched/core.c > > > +++ b/kernel/sched/core.c > > > @@ -6716,6 +6716,12 @@ static void sched_dl_do_global(void) > > > raw_spin_unlock_irqrestore(&dl_b->lock, flags); > > > > > > rcu_read_unlock_sched(); > > > + if (dl_b->bw == -1) > > > + cpu_rq(cpu)->dl.deadline_bw_inv = 1 << 8; > > > + else > > > + cpu_rq(cpu)->dl.deadline_bw_inv = > > > + to_ratio(global_rt_runtime(), > > > + global_rt_period()) >> > > > 12; > > > > Coding style requires braces here (on both legs of the condition).. > > Sorry about this; checkpatch did not complain and I did not check the > coding rules. I'll add the braces. I'm not sure it's completely documented anywhere. The brackets are not needed if there's one statement after the if, but for readability, it's sometimes best to put brackets in if there's more than one line. That can even include comments. It's not a hard rule, but more of a preference. I'm personally OK with the above, but Peter being the maintainer, has the say to give the preference of this kind of rule. -- Steve