Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp6373059imd; Wed, 31 Oct 2018 10:39:53 -0700 (PDT) X-Google-Smtp-Source: AJdET5cdMrqa1xtHTFKG6bV8Un/FGK1sZEN58QN9MtpRA1okxnM6GphTjtjvyx7/+VOquF9hZQqR X-Received: by 2002:a63:1342:: with SMTP id 2-v6mr3988977pgt.19.1541007593692; Wed, 31 Oct 2018 10:39:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541007593; cv=none; d=google.com; s=arc-20160816; b=MQA++NT3Di/X8bfLLXN1l08TLd5vGShCpFONIekO1tn8pLaYYaSJhunHYUqub2U1HR I23kpK0a8mwqmkCR94UiQWs9Z1d7BX2EpTV3p44j6C0AZtzjB6dOFNcFVUGLIWjI3J9u zxyGGDlInmtDIkPgX4uApok9zW+KKbOz7FkeQB4lHJoJdutcqumxXEInQQADjbu7UFHw WndTRajfmtwxOtCmltjovA76kT0MZZNYoNXsyLTlC3Edw7Vy0mS4qT5ARWmZhK2XIWnh 6t9Re+sMATxT8jZUV84hmpzGMgS5qnRtG4tHcHMmHIihM+H0QcFcQ+H1wsqFuUcNVTpc avWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=g/hPSRx+4EAfAyglcnx58y5eNBIaMBgVR8dSmawj/2E=; b=qJthxquKEjl9+qyqh99OXj+lmcmesysXJolaOWZ/lD6mqqJCJhYhDp13rCqy5OUamr 0pxV51YPqxz/PZuA/qp/nTeWtsO2QU3f5X5HhsfGpbDYJWodKJwswMt4eG4MQLy91euU 1gmyihFtxUYR8c/rdYtij3etepXZU6r1Gu761RcgE0Quk9aesP6ytYCJEyERq23t1veS zebcj0QjCzmA2MdGkvAgt7joVIZwZWnLSVow/MqAS6Xo+qhwknt0mmUaI1c4XV1WvveK igDaQzqklUqYz85QIVjWFta+Cae2mFkXC7RRU1MQTMDYLGNiqbKh9sYy/mkfKfjCmSvY WMnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=eLEA9iNG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v13si16832510pgn.355.2018.10.31.10.39.38; Wed, 31 Oct 2018 10:39:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=eLEA9iNG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729934AbeKACiG (ORCPT + 99 others); Wed, 31 Oct 2018 22:38:06 -0400 Received: from merlin.infradead.org ([205.233.59.134]:41182 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729754AbeKACiG (ORCPT ); Wed, 31 Oct 2018 22:38:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=g/hPSRx+4EAfAyglcnx58y5eNBIaMBgVR8dSmawj/2E=; b=eLEA9iNGhfPnoTgUX6Om+gmYA D2ZydFVb+9xLmRTPyQyXfvhjRw34UXgB8bPAHpKNNKdkGC4C97vByCCNqajeYHNRwlmH1Za193WjP PJ5YABaTMjPJzAtKbi2JAsmleV2Y4CoxnRgKffnO7RZkblBdkp0mDXR/NmJuu0MeUhqIEA+YGei53 n9J62SH39E1zqOuDw5a3LtlL4IcsEgUh7Xu0n/LTv+cCuuTa+mESG32AXbMAraz4BsEFe2OMuGL1r sjvBpw+9WYs2gGpShb8CoSZZw7W3iNIRaydCZS5dZNEqzzCtBxTaI7kyElKybw0S2JljrmVMc9DIC xrRc+5Y6Q==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHuS7-0005ot-R8; Wed, 31 Oct 2018 17:38:48 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1AA5F2029F87F; Wed, 31 Oct 2018 18:38:46 +0100 (CET) Date: Wed, 31 Oct 2018 18:38:46 +0100 From: Peter Zijlstra To: Daniel Bristot de Oliveira Cc: luca abeni , Juri Lelli , Thomas Gleixner , Juri Lelli , syzbot , Borislav Petkov , "H. Peter Anvin" , LKML , mingo@redhat.com, nstange@suse.de, syzkaller-bugs@googlegroups.com, henrik@austad.us, Tommaso Cucinotta , Claudio Scordino Subject: Re: INFO: rcu detected stall in do_idle Message-ID: <20181031173846.GD13219@hirez.programming.kicks-ass.net> References: <20181018082838.GA21611@localhost.localdomain> <20181018122331.50ed3212@luca64> <20181018104713.GC21611@localhost.localdomain> <20181018130811.61337932@luca64> <20181019113942.GH3121@hirez.programming.kicks-ass.net> <20181019225005.61707c64@nowhere> <20181024120335.GE29272@localhost.localdomain> <20181030104554.GB8177@hirez.programming.kicks-ass.net> <20181030120804.2f30c2da@sweethome> <2942706f-db18-6d38-02f7-ef21205173ca@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2942706f-db18-6d38-02f7-ef21205173ca@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 31, 2018 at 05:18:00PM +0100, Daniel Bristot de Oliveira wrote: > Brazilian part of the Ph.D we are dealing with probabilistic worst case > execution time, and to be able to use probabilistic methods, we need to remove > the noise of the IRQs in the execution time [1]. So, IMHO, using > CONFIG_IRQ_TIME_ACCOUNTING is a good thing. > With this in mind: we do *not* use/have an exact admission test for all cases. > By not having an exact admission test, we assume the user knows what he/she is > doing. In this case, if they have a high load of IRQs... they need to know that: So I mostly agree with the things you said; IRQs are a different 'context' or 'task' from the normal scheduled task. For AC we can consider an average IRQ load etc.. But even if we get AC sufficient with an average IRQ load, there are still the cases where the IRQs cluster. So, esp. for very short runtimes, you can get this scenario. > 1) Their periods should be consistent with the "interference" they might receive. > 2) Their tasks can miss the deadline because of IRQs (and there is no way to > avoid this without "throttling" IRQs...) True. > So, is it worth to put a duct tape for this case? My point was mostly to to not misbehave. Maybe I got it wrong, that happens ;-) > >> @@ -1171,6 +1162,17 @@ static void update_curr_dl(struct rq *rq) > >> return; > >> } > >> > >> + wall = rq_clock(); > >> + delta_wall = wall - dl_se->wallstamp; > >> + if (delta_wall > 0) { > >> + dl_se->walltime += delta_wall; > >> + dl_se->wallstamp = wall; > >> + } > >> + > >> + /* check if rq_clock_task() has been too slow */ > >> + if (unlikely(dl_se->walltime > dl_se->period)) > >> + goto throttle; > >> + > > If I got it correctly, it can be the case that we would throttle a thread that, > because of IRQs, received less CPU time than expected, right? So the thinking was that when the actual walltime runtime (which includes IRQs) exceeds the period, our whole CBS model breaks and we need to replenish and push forward the deadline. Maybe it should do that and not throttle. Also, the walltime -= period thing should be fixed to never go negative I think.