From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752135AbcBWNKw (ORCPT ); Tue, 23 Feb 2016 08:10:52 -0500 Received: from smtprelay0075.hostedemail.com ([216.40.44.75]:50066 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752068AbcBWNKu (ORCPT ); Tue, 23 Feb 2016 08:10:50 -0500 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:968: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:2693:2892:3138:3139:3140:3141:3142:3355:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:4362:5007:6119:6261:6691:7875:7903:8660:9040:10004:10400:10848:10967:11026:11232:11658:11914:12295:12438:12517:12519:12663:12740:13142:13148:13230:14096:14097:14659:21063:21067:21080:21324,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:17,LUA_SUMMARY:none X-HE-Tag: end46_701bd8ca4c2f X-Filterd-Recvd-Size: 3913 Date: Tue, 23 Feb 2016 08:10:46 -0500 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 3/4] sched/deadline: Tracepoints for deadline scheduler Message-ID: <20160223081046.529d615c@gandalf.local.home> In-Reply-To: <20160223104408.GO6357@twins.programming.kicks-ass.net> References: <20160222173259.GM6357@twins.programming.kicks-ass.net> <20160222124854.3816fec4@gandalf.local.home> <20160222213017.GN6357@twins.programming.kicks-ass.net> <20160222173043.24873ae8@gandalf.local.home> <20160223104408.GO6357@twins.programming.kicks-ass.net> X-Mailer: Claws Mail 3.13.1 (GTK+ 2.24.29; 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 On Tue, 23 Feb 2016 11:44:08 +0100 Peter Zijlstra wrote: > No it very much illustrates the problem and is a very clear indication > that tracepoints are an ABI. Yes they are. But note, they can change if nobody notices ;-) > > > > Heh, it's not really changing state. The code directly after this is: > > > > p->dl.runtime = 0; > > Yes, it more or less 'works', but its still atrocious shite. Its the > worst kind of anti pattern possible. > > Suppose someone comes and removes that line, and ignores the tracepoint > stuff, because, hell its a tracepoint, those don't modify stuff. > > Its just really, utterly bad practice. > > You've done this tracing code long enough, you really should _KNOW_ > this. You're right. I got too caught up in the cleverness of the hack to acknowledge it is a hack. But Daniel has a patch to clean up the yield code which would also help in making this hack unnecessary for this tracepoint. > > > > So tell me why these specific tracepoints and why the existing ones > > > could not be extended to include this information. For example, why a > > > trace_sched_dealine_yield, and not a generic trace_sched_yield() that > > > works for all classes. > > > > But what about reporting actual runtime, and when the next period will > > come. That only matters for deadline. > > How is that an answer to the question? Are you implying a generic > trace_sched_yield() call could not do this? > > > > But do not present me with a bunch of random arse, hacked together > > > tracepoints and tell me they might be useful, maybe. > > > > > > They ARE useful. These are the tracepoints I'm currently using to > > debug the deadline scheduler with. They have been indispensable for my > > current work. > > They are, most obviously, a hacked together debug session for sure. This > is _NOT_ what you commit. > > Now ideally we'd do something like the below, but because trainwreck, we > cannot actually do this I think :-( > > It gets you about half of what your patch does, but shows how to also > do a generic sched_yield(). The replenish might have to remain special, > although both CFS and RT also have replenishes, albeit significantly > different. OK, I admit. I was very single focused on deadline scheduler. I wasn't looking at how this could work with the rest of the scheduler. I'll take a look at the patches you posted. Thanks! -- Steve