Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757587AbcC2RNs (ORCPT ); Tue, 29 Mar 2016 13:13:48 -0400 Received: from smtprelay0141.hostedemail.com ([216.40.44.141]:36350 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752925AbcC2RNq (ORCPT ); Tue, 29 Mar 2016 13:13:46 -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:2393:2553:2559:2562:2693:3138:3139:3140:3141:3142:3353:3622:3865:3867:3868:3871:3872:3873:3874:4321:4605:5007:6119:6261:7875:7903:8660:10004:10400:10848:10967:11026:11232:11658:11914:12043:12438:12517:12519:12555:12740:13069:13148:13230: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:1,LUA_SUMMARY:none X-HE-Tag: pipe43_5ae3b954eb247 X-Filterd-Recvd-Size: 2972 Date: Tue, 29 Mar 2016 13:13:43 -0400 From: Steven Rostedt To: Daniel Bristot de Oliveira Cc: Peter Zijlstra , Ingo Molnar , Thomas Gleixner , Juri Lelli , Arnaldo Carvalho de Melo , LKML , linux-rt-users Subject: Re: [PATCH V2 3/3] sched/deadline: Tracepoints for deadline scheduler Message-ID: <20160329131343.3b2bcf76@gandalf.local.home> In-Reply-To: <56FAA8FA.5060407@redhat.com> References: <14f6caa05f73ceba69eff035ac542cad671552b3.1459182044.git.bristot@redhat.com> <20160329151649.GA12845@twins.programming.kicks-ass.net> <56FAA8FA.5060407@redhat.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; 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: 1717 Lines: 40 On Tue, 29 Mar 2016 13:10:34 -0300 Daniel Bristot de Oliveira wrote: > On 03/29/2016 12:16 PM, Peter Zijlstra wrote: > >> + trace_sched_deadline_yield(&rq->curr->dl); > > ouch, it should be trace_sched_deadline_yield(dl_se). It works > as is, but it is really very sad, my bad, sorry. > > >> > dl_se->dl_throttled = 1; > >> > + trace_sched_deadline_throttle(dl_se); > > This is just really very sad. > > Am I missing any other really very sad thing here? Well, we shouldn't have two tracepoints back to back. > > >> > __dequeue_task_dl(rq, curr, 0); > >> > if (unlikely(dl_se->dl_boosted || !start_dl_timer(curr))) > >> > enqueue_task_dl(rq, curr, ENQUEUE_REPLENISH); > >> > @@ -910,6 +917,7 @@ enqueue_dl_entity(struct sched_dl_entity *dl_se, > >> > static void dequeue_dl_entity(struct sched_dl_entity *dl_se) > >> > { > >> > __dequeue_dl_entity(dl_se); > >> > + trace_sched_deadline_block(dl_se); > >> > } > > And that's just not going to happen. > > It will, if a task goes to sleep during the activation, > e.g., when blocking on a system call. For example: > > -0 [007] d..3 78377.688969: sched_switch: prev_comm=swapper/7 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=b next_pid=18973 next_prio=-1 > b-18973 [007] d..3 78377.688979: sched_deadline_block: now=78377.688976271 deadline=78377.718945137 remaining_runtime=9968866 > b-18973 [007] d..3 78377.688981: sched_switch: prev_comm=b prev_pid=18973 prev_prio=-1 prev_state=S ==> next_comm=swapper/7 next_pid=0 next_prio=120 Why did it go to sleep? The above is still not very useful. What do you mean "blocking on a system call"? -- Steve