Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757406AbcC2P5R (ORCPT ); Tue, 29 Mar 2016 11:57:17 -0400 Received: from smtprelay0254.hostedemail.com ([216.40.44.254]:42752 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751343AbcC2P5Q (ORCPT ); Tue, 29 Mar 2016 11:57:16 -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:1542:1593:1594:1711:1730:1747:1777:1792:1981:2194:2199:2393:2553:2559:2562:2892:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3871:3872:3874:5007:6261:7875:7903:8660:10004:10400:10450:10455:10848:10967:11026:11232:11658:11914:12043:12296:12438:12517:12519:12663:12740:13148:13161:13229:13230:13439:14096:14097:14181:14659:14721:19904:19999:21080:30045:30054:30070:30075: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:3,LUA_SUMMARY:none X-HE-Tag: dirt03_33654ce18143 X-Filterd-Recvd-Size: 3305 Date: Tue, 29 Mar 2016 11:57:00 -0400 From: Steven Rostedt To: Peter Zijlstra Cc: Daniel Bristot de Oliveira , 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: <20160329115700.40acb336@gandalf.local.home> In-Reply-To: <20160329151649.GA12845@twins.programming.kicks-ass.net> References: <14f6caa05f73ceba69eff035ac542cad671552b3.1459182044.git.bristot@redhat.com> <20160329151649.GA12845@twins.programming.kicks-ass.net> 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: 2042 Lines: 53 On Tue, 29 Mar 2016 17:16:49 +0200 Peter Zijlstra wrote: > On Mon, Mar 28, 2016 at 01:50:51PM -0300, Daniel Bristot de Oliveira wrote: > > @@ -733,7 +738,9 @@ static void update_curr_dl(struct rq *rq) > > > > throttle: > > if (dl_runtime_exceeded(dl_se) || dl_se->dl_yielded) { > > + trace_sched_deadline_yield(&rq->curr->dl); > > dl_se->dl_throttled = 1; > > + trace_sched_deadline_throttle(dl_se); > > This is just really very sad. I agree. This should be a single tracepoint here. Especially since it seems that dl_se == &rq->curr->dl :-) But perhaps we should add that generic sys_yield() tracepoint, to be able to see that the task was throttled because of a yield call. We still want to see a task yield, and then throttle because of it. The deadline/runtime should reflect the information correctly. > > > __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. Sure, we'll probably want to figure out a better way to see deadline tasks blocked. Probably can see that from sched switch though, as it would be in the blocked state as it scheduled out. Hmm, I probably could add tracing infrastructure that would let us extend existing tracepoints. That is, without modifying sched_switch, we could add a new tracepoint that when enabled, would attach itself to the sched_switch tracepoint and record different information. Like a special sched_switch_deadline tracepoint, that would record the existing runtime,deadline and period for deadline tasks. It wont add more tracepoints into the core scheduler, but use the existing one. Maybe something to play with while I'm on the flight to San Diego or Portland. -- Steve