Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3163086imm; Fri, 19 Oct 2018 06:15:16 -0700 (PDT) X-Google-Smtp-Source: ACcGV62YvJz4cC+OIkCMTlxtrSGdjF1vklOlLVNtxOMfixnFPWjucLx4yCSHSQZIQoRoEp0xFreL X-Received: by 2002:a62:7d8d:: with SMTP id y135-v6mr34408572pfc.245.1539954916126; Fri, 19 Oct 2018 06:15:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539954916; cv=none; d=google.com; s=arc-20160816; b=qXVcRKuvnizBbpaJiArvWJbI83APAsfHvCf17sVVPJzManXO3bBggE2yOICD5HyHrQ CO+0sPWsrcY4xjK89lQyYCwb6vY+C95nqYOpIzyItc/UVNDtOCaZzhl9iulSjeCjlau2 rCn24K5iEVdKzmEFB/D7irYhqILQfsYLRLxT1lRmcDgcn58UToGWRrd3wq2ZxoC5DWqD VID2ezCHIOGZvwB8HS2y1Q/vaYgVfif7Y2nHowFSHhTezxEKBmNBXGu4S5zO9Lf0Vhud gVWKXUqmhDW6zDEGX5FwMwtX/H3Kqb0M1yq1FTpslzcYtpQrz3CIIBA+uNej06zUOjPI N7yg== 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=f0mS9vA2ZdzRHix5CzYQhdZZWlCbtc4+gB0pxQ4uYv0=; b=X3JrzcqUchIC5U1t9PYLNaUPwdoN/IC8gRNblPavesExMDygAqlTQxcURR43IJbWMr 5TDvElYs+pfw5i6nOwrnnbuCi6B55NIS/sq4+VIRP7/bcDIFXbS0NW8mNAj3/T/s6JqT LUmDqt/tyt6v7u9N9BgutuVVLD5lSn8tTCKdjWt1rQKBPPt6XkO99WD7k4CtHjZwixLd VixlcAKZj2q3i2L95hU5lpX7/v6RYp+rxzjWrHUv3vzkkrSum6wxgxZGmzZqOMBwW4uA kEwdWIZYEOAJfw3x3WMV/ODR/eze0b1gnuX66Kbbg/BFNqZsuLMzDKzOTaR1qwtbnMMM nZPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=aWygRHnt; 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 o4-v6si6538512pgl.68.2018.10.19.06.15.00; Fri, 19 Oct 2018 06:15:16 -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=bombadil.20170209 header.b=aWygRHnt; 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 S1727366AbeJSVUl (ORCPT + 99 others); Fri, 19 Oct 2018 17:20:41 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:37878 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727017AbeJSVUk (ORCPT ); Fri, 19 Oct 2018 17:20:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=f0mS9vA2ZdzRHix5CzYQhdZZWlCbtc4+gB0pxQ4uYv0=; b=aWygRHntyRxumVms7gx2uU26U /66zFa5khIAPIWj13zE+A0CGpbbH9fDhDc9a5PgQHtSmL9GvLEeZuTvcHoxNpCuK5/0POhZPQOyRz N2k3mdGNwHWsVEwq8NWYQa+uOPtUeOzN0Wz+7NvaGHkTvAgp+sMGmpAa5qK7OhYOA5okCgSrp5N+D vf+dHyvT3rUaxmtuhV/OnBW4wzaz62SAackqHa7txBgR1dlKJNzyJMuos2dlvH8E1xcQ8VzS74V+d IQ5dZtPgBq31EBQsHzHHr0vRwyExFaLp4ezWLfwrv1YypVhpXWNR3ZfdjE2sO9+Pw2PQ1YFx6qXb8 jfN9w2hVA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gDUbd-00008Y-Fg; Fri, 19 Oct 2018 13:14:21 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id EBBE520298568; Fri, 19 Oct 2018 15:14:18 +0200 (CEST) Date: Fri, 19 Oct 2018 15:14:18 +0200 From: Peter Zijlstra To: luca abeni Cc: 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 , Daniel Bristot de Oliveira Subject: Re: INFO: rcu detected stall in do_idle Message-ID: <20181019131418.GI3121@hirez.programming.kicks-ass.net> References: <000000000000a4ee200578172fde@google.com> <20181016140322.GB3121@hirez.programming.kicks-ass.net> <20181016144045.GF9130@localhost.localdomain> <20181016153608.GH9130@localhost.localdomain> <20181018082838.GA21611@localhost.localdomain> <20181018094850.GW3121@hirez.programming.kicks-ass.net> <20181018123332.6f33f715@luca64> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181018123332.6f33f715@luca64> 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 Thu, Oct 18, 2018 at 12:33:32PM +0200, luca abeni wrote: > Hi Peter, > > On Thu, 18 Oct 2018 11:48:50 +0200 > Peter Zijlstra wrote: > [...] > > > So, I tend to think that we might want to play safe and put some > > > higher minimum value for dl_runtime (it's currently at 1ULL << > > > DL_SCALE). Guess the problem is to pick a reasonable value, though. > > > Maybe link it someway to HZ? Then we might add a sysctl (or > > > similar) thing with which knowledgeable users can do whatever they > > > think their platform/config can support? > > > > Yes, a HZ related limit sounds like something we'd want. But if we're > > going to do a minimum sysctl, we should also consider adding a > > maximum, if you set a massive period/deadline, you can, even with a > > relatively low u, incur significant delays. > > I agree with this. > > > > And do we want to put the limit on runtime or on period ? > > I think we should have a minimum allowed runtime, a maximum allowed > runtime, a minimum allowed period and a (per-user? per-control > group?) maximum allowed utilization. I was talking about a global !root max-u, but yes the cgroup max-u makes definite sense as well. > I suspect having a maximum period is useless, if we already enforce a > maximum runtime. Probably; yes. The asymmetry is unfortunate of course. > > That is, something like: > > > > TICK_NSEC/2 < period < 10*TICK_NSEC > > As written above I would not enforce a maximum period. I'm confused: 'period < 10*TICK_NSEC' reads like a max to me. (irrespective of the argument on wether the max should be HZ related; and I think you and Juri made good argument for it not to be) > > and/or > > > > TICK_NSEC/2 < runtime < 10*TICK_NSEC > > I think (but I might be wrong) that "TICK_NSEC/2" is too large... I > would divide the tick for a larger number (how many time do we want to > allow the loop to run?) It depends on how strict we want to enforce the no-interference rule. The smaller we make this, the less accurate we enforce, the worse the interference between tasks. Note that we're only talking about a default; and HZ=100 is daft in any case. > And I think the maximum runtime should not be TICK-dependent... It is > the maximum amount of time for which we allow the dealdine task to > starve non-deadline tasks, so it should be an absolute time, not > something HZ-dependent... No? Agreed. > > Hmm, for HZ=1000 that ends up with a max period of 10ms, that's far > > too low, 24Hz needs ~41ms. We can of course also limit the runtime by > > capping u for users (as we should anyway). > > Regarding capping u for users: some time ago, with Juri we discussed > the idea of having per-cgroup limits on the deadline utilization... I > think this is a good idea (and if the userspace creates a cgroup per > user, this results in per-user capping - but it is more flexible in > general) Agreed, that makes sense.