Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5269234imm; Tue, 16 Oct 2018 07:46:47 -0700 (PDT) X-Google-Smtp-Source: ACcGV60gM3NanwKa1IuCyLanzx/FUKqJOXL85LrbdhvbiSr0GXbMz7Q4jQ+iSRE8rzEGi9IkG8Z9 X-Received: by 2002:a62:3a43:: with SMTP id h64-v6mr22212930pfa.119.1539701206993; Tue, 16 Oct 2018 07:46:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539701206; cv=none; d=google.com; s=arc-20160816; b=eClA8SIkMol5HHf0wTRdaw6YYu0UJx/0PFQcmSktdqblLtKsoowRLiELKghC/wptcx 1Bzqg1ae5y2vM26EPa+c+/4rTxGgzgmHQurisb+7Y/cUbHTRHnuwbrsqMrhASYK/AWg2 ijQg2y7RtvxUZM0Hvq0irUwXhsRla1/YfGvRQ9zMnz4k/xT2GXxvuYbLjkbKOVWTutiq CEA65K42NCvQE3HC38Z0HwH6Z8sZRlygZ5s8Svdrz94p/i4vBJ3i6JsKi73+lyfaDA+P EWhtg5hpSmWwAQaEHU1Xnn2i7oClzL4F78gpH9tkCD+o5S6trYVx108uiRBhS1ijwJ8u RJsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=ZXSA5poOkSs+rmXS+4dFc96ZMYDE0z/RGSV8ZsXRuoQ=; b=B6vO1pZ5yI0WLSG2409CmPkDtWszYQs5VkJl8wCmnOL0Taut9CliBNH/3ECO31+Xcm xVUqxdRxf9MfolMNBGhQTwzMFGCp54Wc1a9LDa9q7sbMugDyBS8NlH1hIupbUof7VjXa 0t7bKUywDiErl0g50o67Ne1nlnP4IRJnRUq9SbozsbUOqyL6HVCTPBtjra7DOfxTt5KQ Z4o4PM9XtfurCQlW5qW42JXCfOhRGwMfYLIsv6WRGuRPAjKI9Pded9H5Rx+mLxxkFJ91 lSlq+BzmNH9D5NNwRdlLuheuSJz5/UarN+TGA0GX4sonxydshFT1sFTgSW4qAieZvyHe GUNA== ARC-Authentication-Results: i=1; mx.google.com; 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 p17-v6si14702392pgk.58.2018.10.16.07.46.30; Tue, 16 Oct 2018 07:46:46 -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; 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 S1727205AbeJPWgS (ORCPT + 99 others); Tue, 16 Oct 2018 18:36:18 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:58261 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726778AbeJPWgS (ORCPT ); Tue, 16 Oct 2018 18:36:18 -0400 Received: from hsi-kbw-5-158-153-52.hsi19.kabel-badenwuerttemberg.de ([5.158.153.52] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gCQai-0007Ov-Ko; Tue, 16 Oct 2018 16:45:00 +0200 Date: Tue, 16 Oct 2018 16:45:00 +0200 (CEST) From: Thomas Gleixner To: Juri Lelli cc: Peter Zijlstra , syzbot , Borislav Petkov , "H. Peter Anvin" , LKML , mingo@redhat.com, nstange@suse.de, syzkaller-bugs@googlegroups.com, juri.lelli@redhat.com Subject: Re: INFO: rcu detected stall in do_idle In-Reply-To: <20181016144045.GF9130@localhost.localdomain> Message-ID: References: <000000000000a4ee200578172fde@google.com> <20181016140322.GB3121@hirez.programming.kicks-ass.net> <20181016144045.GF9130@localhost.localdomain> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 16 Oct 2018, Juri Lelli wrote: > On 16/10/18 16:03, Peter Zijlstra wrote: > > On Tue, Oct 16, 2018 at 03:24:06PM +0200, Thomas Gleixner wrote: > > > It does reproduce here but with a kworker stall. Looking at the reproducer: > > > > > > *(uint32_t*)0x20000000 = 0; > > > *(uint32_t*)0x20000004 = 6; > > > *(uint64_t*)0x20000008 = 0; > > > *(uint32_t*)0x20000010 = 0; > > > *(uint32_t*)0x20000014 = 0; > > > *(uint64_t*)0x20000018 = 0x9917; > > > *(uint64_t*)0x20000020 = 0xffff; > > > *(uint64_t*)0x20000028 = 0; > > > syscall(__NR_sched_setattr, 0, 0x20000000, 0); > > > > > > which means: > > > > > > struct sched_attr { > > > .size = 0, > > > .policy = 6, > > > .flags = 0, > > > .nice = 0, > > > .priority = 0, > > > .deadline = 0x9917, > > > .runtime = 0xffff, > > > .period = 0, > > > } > > > > > > policy 6 is SCHED_DEADLINE > > > > > > That makes the thread hog the CPU and prevents all kind of stuff to run. > > > > > > Peter, is that expected behaviour? > > > > Sorta, just like FIFO-99 while(1);. Except we should be rejecting the > > above configuration, because of the rule: > > > > runtime <= deadline <= period > > > > Juri, where were we supposed to check that? > > Not if period == 0. > > https://elixir.bootlin.com/linux/latest/source/kernel/sched/deadline.c#L2632 > https://elixir.bootlin.com/linux/latest/source/kernel/sched/deadline.c#L2515 > > Now, maybe we should be checking also against the default 95% cap? If the cap is active, then yes. But you want to use the actual configuration not the default. Thanks, tglx