Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3067778imm; Fri, 19 Oct 2018 04:41:12 -0700 (PDT) X-Google-Smtp-Source: ACcGV62dO280BJq90oANfIQm7Afuzq7psiK2dnAF+IWNAvDmmxqL1JArHED8BJNhJi/IsQD9l+Fn X-Received: by 2002:a62:3641:: with SMTP id d62-v6mr25340506pfa.97.1539949272868; Fri, 19 Oct 2018 04:41:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539949272; cv=none; d=google.com; s=arc-20160816; b=yVMx/BR/K1nny+qvw0QmYoM7/E6PZcZw/jOLf+LNXYvjhtamON009YrqwEgVmSogZS Gx+g2iRoB761lAOEzfE8s1feLUc/UyCqdbhT7exadZC7cmgwFEfyNJL8evBsaj/8egKR +Nr1HdfVEs8ra21J2SgufVkQOIesWtGIjqInxiXCt1Kg83jhVklRKsSdyQ68yekE0SKp 8D63SvMu3+m0tzviLYI+XwBQtoN4QciO7B2ctRP/a0HAW5E2ugzKk0jV2Ihj5IbZM/k0 MarU5lR1vQy6B3SznY+rUoYcleOD1F9Q6h8/WWCXdegO59WcVyAuhxxQkzIUqfSxUZW7 sRJg== 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=eA6QITRghzqA59wlagXhUriGbJdvtkuWgn7JL2XOxUE=; b=CO18XQ6kbVKBW/I8RQvFKkhcmK7nEpZfFLGb5tyH57i9jBD9keXMP7zz/XJWwAtVcQ F1zoestU8oAhiDDJ9ICgFjtdLBBlQO2kiLyTuFRUQ74jmgOPFs66dWHM6jGswrlK98hV 7bcW2frRvKRsIjFxMvlTkgQ+dzFMB6qlXqSq1zz+F97rs1hWNcTLGSwqtrshGI/vno0C XXWj/M6kQMkcrqW0Jbx4e1ePpxKvnU21mKumxKMptV1E7BXbkqH+18b3/WXAcFL80PKh EpFbMhZibaNp+AxnbcQTdn1ZLIn82S5D31haHbfG2gRnl8jL7ks6cbcoeoyWSKjl87Fi PQMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=WJKPQP7z; 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 e8-v6si25038991plb.249.2018.10.19.04.40.57; Fri, 19 Oct 2018 04:41:12 -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=WJKPQP7z; 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 S1727208AbeJSTpy (ORCPT + 99 others); Fri, 19 Oct 2018 15:45:54 -0400 Received: from merlin.infradead.org ([205.233.59.134]:37232 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbeJSTpy (ORCPT ); Fri, 19 Oct 2018 15:45:54 -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=eA6QITRghzqA59wlagXhUriGbJdvtkuWgn7JL2XOxUE=; b=WJKPQP7ztppitf237SqKhk/49 B/78PTKXGgGDZstbtIJtNbWF/NC3duKdt+Z7Wt7uSh6/hLqgsb+mDAgHcAfYh5G54z0EqQUTNKcQj SYiOgBAro6cKhatxhP+zw+P88ZV1ViwJ+EuWS9NRm8dMymeloJOJ+GDq4sriFusjlCvxhabFTN97t XPQd9R+sH83dT/ZiRkEiQqCBQy4yx5L1JpdalFZBFqHO+drJWKtaR5yhJm+GE/XYlWMub0C+PD5wc nt/OPGUWu9FuoqRiP0ozRLT5/52G0OMJnVzhpSMh5tzwMt7L0Bm/b6w/YxET/RmyYETdhbhZe9SJq meLtjJdNA==; 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 1gDT84-0004Xo-O9; Fri, 19 Oct 2018 11:39:45 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 57D3E2029856B; Fri, 19 Oct 2018 13:39:42 +0200 (CEST) Date: Fri, 19 Oct 2018 13:39:42 +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: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181018130811.61337932@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 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. 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.