From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758020AbbJIQis (ORCPT ); Fri, 9 Oct 2015 12:38:48 -0400 Received: from smtprelay0077.hostedemail.com ([216.40.44.77]:45158 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757924AbbJIQid (ORCPT ); Fri, 9 Oct 2015 12:38:33 -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:3138:3139:3140:3141:3142:3352:3622:3865:3871:3872:3874:5007:6261:7875:10004:10400:10848:10967:11026:11232:11473:11658:11914:12043:12294:12438:12517:12519:12555:12740:13069:13311:13357:14096:14097:21080,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 X-HE-Tag: mom06_6795bc1b3675a X-Filterd-Recvd-Size: 2396 Date: Fri, 9 Oct 2015 12:38:30 -0400 From: Steven Rostedt To: Daniel Bristot de Oliveira Cc: Peter Zijlstra , Ingo Molnar , LKML , "Luis Claudio R. Goncalves" Subject: Re: [PATCH] trace: stop critical timings before idle loop on idle=poll Message-ID: <20151009123830.03b4cb5c@gandalf.local.home> In-Reply-To: <10fc3705874aef11dbe152a068b591a7be1899b4.1444314899.git.bristot@redhat.com> References: <10fc3705874aef11dbe152a068b591a7be1899b4.1444314899.git.bristot@redhat.com> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; 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 Thu, 8 Oct 2015 15:36:06 -0300 Daniel Bristot de Oliveira wrote: > When using idle=poll, the preemptoff tracer is always showing the idle > task as the culprit for long latencies. That happens because critical > timings are not stopped before idle loop. This patch stops critical > timings before entering the idle loop, starting it again after the > idle loop. > > This problem does not affect the irqsoff tracer because interruptions > are enabled before entering the idle loop. > > Signed-off-by: Daniel Bristot de Oliveira > Reviewed-by: Luis Claudio R. Goncalves Acked-by: Steven Rostedt -- Steve > --- > kernel/sched/idle.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c > index 8f177c7..4a2ef5a 100644 > --- a/kernel/sched/idle.c > +++ b/kernel/sched/idle.c > @@ -57,9 +57,11 @@ static inline int cpu_idle_poll(void) > rcu_idle_enter(); > trace_cpu_idle_rcuidle(0, smp_processor_id()); > local_irq_enable(); > + stop_critical_timings(); > while (!tif_need_resched() && > (cpu_idle_force_poll || tick_check_broadcast_expired())) > cpu_relax(); > + start_critical_timings(); > trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); > rcu_idle_exit(); > return 1;