Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3618381imm; Fri, 19 Oct 2018 13:50:56 -0700 (PDT) X-Google-Smtp-Source: ACcGV62Ku3FhOgZxIq51CMTBWUOpjsrEEBJgnl2vy+AScX2CGBUSocfVtOldYXZNOv79C8Pi59fe X-Received: by 2002:a63:9e02:: with SMTP id s2-v6mr34580804pgd.302.1539982255970; Fri, 19 Oct 2018 13:50:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539982255; cv=none; d=google.com; s=arc-20160816; b=QklfJndcDlwn2YeG3JVWES73keJzpBtUdXOLv3C5yADT1+6KSpmCN6qFbh3wh7Tnfu lUipNw6weqDr7/CKoV/teIWOKgjjmlF3kjoikEL0brIJDo1pGu4ADx6jPAzvAxKoxpAp YWl4IzgpuEp8BRzuJmpdi1sSzbnUQq/nN87L5jE4hAWBQbROMrGxwo0M9BHi9AMG/ubN MttQ446HAwSK+LTVjQCzz1Zb2NWriEqbA2FHuKpg5apjXLzfb9KaGMdQgs0cGg7f1nSf uUQXtdZza73z1iHwPrkTcfq7W5UU4/20nSiBAoSKxhoYSj4WlV6sVtwHO8HlLEiD1u91 6YEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=xDdx0SnJwkAgPS/HCdtkpBLkfDB/c3nvzgzVzbhDdSY=; b=frPNuNu1he4bWeshoTsTz7hhpWXfH79BxKPX8UAbRFyHWgnRjquj2P3m0+pEGX8YTM y1mL+rAETnTEGkY7OLj9tr6TvaEB2RXrFhDoM73OfoG2n+KU/F0nZ6ikeA9XsXnS04av ehI1tvFhYtWTwTYZy4D3dtZVeWkNNaN5dPfdEVlQ1t2yOJ2apev9t+HC39JaoBFLkyRF kYMvl0Ahv+X5+CiQeFEOtHZwjVnJ7gtcF33r8r7rkAgBwbcRv0xRd7onaBsplbImaocW fzqTzf+qWCNLZ0CBR7ll+rkjS36at0Aj9sFbk2afD2BY7nwNcTN3ZSQtGbQTv7Y7Hte5 N6hQ== 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 b23-v6si5489615plz.225.2018.10.19.13.50.40; Fri, 19 Oct 2018 13:50:55 -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 S1726640AbeJTE55 (ORCPT + 99 others); Sat, 20 Oct 2018 00:57:57 -0400 Received: from mail.santannapisa.it ([193.205.80.98]:50412 "EHLO mail.santannapisa.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726321AbeJTE55 (ORCPT ); Sat, 20 Oct 2018 00:57:57 -0400 Received: from [151.40.1.127] (account l.abeni@santannapisa.it HELO nowhere) by santannapisa.it (CommuniGate Pro SMTP 6.1.11) with ESMTPSA id 133834824; Fri, 19 Oct 2018 22:50:12 +0200 Date: Fri, 19 Oct 2018 22:50:05 +0200 From: luca abeni To: Peter Zijlstra 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: <20181019225005.61707c64@nowhere> In-Reply-To: <20181019113942.GH3121@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> <20181018122331.50ed3212@luca64> <20181018104713.GC21611@localhost.localdomain> <20181018130811.61337932@luca64> <20181019113942.GH3121@hirez.programming.kicks-ass.net> Organization: Scuola Superiore S.Anna X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 19 Oct 2018 13:39:42 +0200 Peter Zijlstra wrote: > On Thu, Oct 18, 2018 at 01:08:11PM +0200, luca abeni wrote: > > Ok, I see the issue now: the problem is that the "while > > (dl_se->runtime <= 0)" loop is executed at replenishment time, but > > the deadline should be postponed at enforcement time. > > > > I mean: in update_curr_dl() we do: > > dl_se->runtime -= scaled_delta_exec; > > if (dl_runtime_exceeded(dl_se) || dl_se->dl_yielded) { > > ... > > enqueue replenishment timer at dl_next_period(dl_se) > > But dl_next_period() is based on a "wrong" deadline! > > > > > > I think that inserting a > > while (dl_se->runtime <= -pi_se->dl_runtime) { > > dl_se->deadline += pi_se->dl_period; > > dl_se->runtime += pi_se->dl_runtime; > > } > > immediately after "dl_se->runtime -= scaled_delta_exec;" would fix > > the problem, no? > > That certainly makes sense to me. Good; I'll try to work on this idea in the weekend. Thanks, Luca > The only remaining issue would then > be placing a limit on the amount of times we can take that loop; > which, as you propose in a later email; can be done separately as a > limit on runtime.