Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750966AbcCEUu3 (ORCPT ); Sat, 5 Mar 2016 15:50:29 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:35563 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750781AbcCEUu1 (ORCPT ); Sat, 5 Mar 2016 15:50:27 -0500 Date: Sat, 5 Mar 2016 21:50:16 +0100 From: luca abeni To: Ingo Molnar Cc: Juri Lelli , Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH] sched/deadline: remove dl_new from sched_dl_entity Message-ID: <20160305215016.79eed9dd@utopia> In-Reply-To: <20160305085059.GA23473@gmail.com> References: <1457095365-28113-1-git-send-email-luca.abeni@unitn.it> <20160305085059.GA23473@gmail.com> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; i686-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: 1474 Lines: 59 On Sat, 5 Mar 2016 09:50:59 +0100 Ingo Molnar wrote: > > * Luca Abeni wrote: > > > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c > > index 57b939c..e0c4456 100644 > > --- a/kernel/sched/deadline.c > > +++ b/kernel/sched/deadline.c > > @@ -352,7 +352,14 @@ static inline void setup_new_dl_entity(struct sched_dl_entity *dl_se, > > struct dl_rq *dl_rq = dl_rq_of_se(dl_se); > > struct rq *rq = rq_of_dl_rq(dl_rq); > > > > - WARN_ON(!dl_se->dl_new || dl_se->dl_throttled); > > + WARN_ON(dl_time_before(rq_clock(rq), dl_se->deadline)); > > + > > + /* We are racing with the deadline timer. So, do nothing because > > + the deadline timer handler will take care of properly recharging > > + the runtime and postponing the deadline > > + */ > > + if(dl_se->dl_throttled) > > + return; > > Obligatory: > > Please use the customary (multi-line) comment style: [...] Sorry about that (and other similar issues). I'll fix all the coding style issues and resubmit on Monday. Thanks, Luca > > /* > * Comment ..... > * ...... goes here. > */ > > ... specified in Documentation/CodingStyle. > > > static void switched_to_dl(struct rq *rq, struct task_struct *p) > > { > > + if (dl_time_before(p->dl.deadline, rq_clock(rq))) { > > + setup_new_dl_entity(&p->dl, &p->dl); > > + } > > Obligatory: > > Please don't use curly braces around single statements. > > Thanks, > > Ingo > >