Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp319573ybm; Tue, 26 May 2020 18:07:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYZ75tXETOsxzqwI/mqgi9BGeiXD9+UVjQXYuh6oWzpl4ja7g8I33vn2H96bKBJ4Mgz8Jj X-Received: by 2002:a17:906:3095:: with SMTP id 21mr3552416ejv.32.1590541640859; Tue, 26 May 2020 18:07:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590541640; cv=none; d=google.com; s=arc-20160816; b=OC7slMpn8jkEsJrtw47iUUjynbnc5jBmQOSD4l8nhV5k5KhMJCp4B5nt4zL9PkjBGg SFo2QkpXwaIQgYahtnUZVwHytEKSeIlNwFYIL9O5HJHs3OnYi4Fv+UXHU2gzswCkE/ed zr2EseRPECLVJpV61XvLISsmBKho+CqaFe1G5RRHoxbrzWr7gpE4mLIYzO7UtdE+RHBQ x2+KOr08/v+w4doznho9gryqZuGwKsdHNzaNzrAmKFTpGdVFuTm6BzGfNoCszhLq0OjO YVg/aTWqQhdwkcgDEWf7+588gbN1QOWmlFxK6ADJuGspuD9ePBvw4jgKBGA3gVXzA9UT DZbA== 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:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=xndUp8xZXC8rSgoYsWi3pz6XcaNGZFvtEqFTvPMLRFI=; b=L6pQCl5QaRpNl8DMKTTe0Oq71frc9Grr/maJ9ywGArYn7wPtGOfaChDmZ+qllE2fse Fomuhk8aWG5eTRH9/kzLrfTyEPxfP6flrK9eyKIc9GGk/HCpmfYs0ctw8oWbFxCvYh8U UfOq7lW0YHYu3oBoWD1MdkdbvxofbQHLrAp0b8aiIzQhmxM3Zry0ip86nGJobK0Febp1 z5AxS3h87+iZOzM4CSNaKBu9dq0T1+h+1IcpTnLEd2RGxhgpY383QENFb2ymUlPB/uFS 7iojDX7XKpJ00YvMhjMZeFWWaaMQ6Romu9Me0DXE+Fhhr18Mtnt/doW8+ZnCDnJqtqOx XLRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Iz6UWmVC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 8si1028344ejx.280.2020.05.26.18.06.58; Tue, 26 May 2020 18:07:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Iz6UWmVC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391962AbgEZW3B (ORCPT + 99 others); Tue, 26 May 2020 18:29:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:52972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389889AbgEZW3A (ORCPT ); Tue, 26 May 2020 18:29:00 -0400 Received: from paulmck-ThinkPad-P72.home (50-39-105-78.bvtn.or.frontiernet.net [50.39.105.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 487A62088E; Tue, 26 May 2020 22:29:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590532140; bh=8GHrdZXRVOoD1gF4tgVG0XshmastkOobedaTmUEsRag=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=Iz6UWmVC4Vy3h2NzRiIfnh+L+CSF6bB1kU+LxfqSsRTVYlvdHuiEaH2nuSBqGb15R tNza6HIh+grxJeQ5eMO7OFbY3Xkjlu4BQztHc/hLTz/gTvZPl9HN1uI0n580HEwNUS jZMWrYXVDr34+ryJgUbzr9p4Q3P6oQNYp9CmXPbA= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 2F64A3522C79; Tue, 26 May 2020 15:29:00 -0700 (PDT) Date: Tue, 26 May 2020 15:29:00 -0700 From: "Paul E. McKenney" To: Joel Fernandes Cc: Frederic Weisbecker , LKML , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Josh Triplett Subject: Re: [PATCH 01/10] rcu: Directly lock rdp->nocb_lock on nocb code entrypoints Message-ID: <20200526222900.GQ2869@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20200513164714.22557-1-frederic@kernel.org> <20200513164714.22557-2-frederic@kernel.org> <20200520122949.GB16672@google.com> <20200522175739.GM2869@paulmck-ThinkPad-P72> <20200526152137.GB76276@google.com> <20200526162946.GK2869@paulmck-ThinkPad-P72> <20200526201840.GC76276@google.com> <20200526210947.GP2869@paulmck-ThinkPad-P72> <20200526212756.GF76276@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200526212756.GF76276@google.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 26, 2020 at 05:27:56PM -0400, Joel Fernandes wrote: > On Tue, May 26, 2020 at 02:09:47PM -0700, Paul E. McKenney wrote: > [...] > > > > > BTW, I'm really itching to give it a try to make the scheduler more deadlock > > > > > resilient (that is, if the scheduler wake up path detects a deadlock, then it > > > > > defers the wake up using timers, or irq_work on its own instead of passing > > > > > the burden of doing so to the callers). Thoughts? > > > > > > > > I have used similar approaches within RCU, but on the other hand the > > > > scheduler often has tighter latency constraints than RCU does. So I > > > > think that is a better question for the scheduler maintainers than it > > > > is for me. ;-) > > > > > > Ok, it definitely keeps coming up in my radar first with the > > > rcu_read_unlock_special() stuff, and now the nocb ;-). Perhaps it could also > > > be good for a conference discussion! > > > > Again, please understand that RCU has way looser latency constraints > > than the scheduler does. Adding half a jiffy to wakeup latency might > > not go over well, especially in the real-time application area. > > Yeah, agreed that the "deadlock detection" code should be pretty light weight > if/when it is written. In addition, to even stand a chance, you would need to use hrtimers. The half-jiffy (at a minimum) delay from any other deferral mechanism that I know of would be the kiss of death, especially from the viewpoint of the real-time guys. > > But what did the scheduler maintainers say about this idea? > > Last I remember when it came up during the rcu_read_unlock_special() deadlock > discussions, there's no way to know for infra like RCU to know that it was > invoked from the scheduler. > > The idea I am bringing up now (about the scheduler itself detecting a > recursion) was never brought up (not yet) with the sched maintainers (at > least not by me). It might be good to bounce if off of them sooner rather than later. Thanx, Paul