Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp5064501ybf; Wed, 4 Mar 2020 16:37:00 -0800 (PST) X-Google-Smtp-Source: ADFU+vt6tpqHV/jIq+w3ONJ2Tq7i8nAwerrGNMkSOqPxI7U4h4B0aJPwmr+ERp8iD/XNytK86Tqo X-Received: by 2002:a9d:7d0c:: with SMTP id v12mr4452423otn.171.1583368620550; Wed, 04 Mar 2020 16:37:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583368620; cv=none; d=google.com; s=arc-20160816; b=ABEzq3dnps3g76PUWQNWIY7LqduXufdddBvM0Li6ksD2pxFI/r3sCnzsjTFz06HF0q gGKG+EW6wEvuj5G1gtfPFhzEbYMqo35so1wW0ezh7Ounud6alRzg5XC21H1VB60j1lZR Z+X3rJtPPs5DO/bYodn/veOToiagtu0xPk2VMCmPiy/nOs4yY2IN4Y6BYaptO/6Pibve OZJXV45Tf1pUigFx4GamenIgYbISioxXbz4bXQp6Q9J6UWWhcgGeRGsP3fRjNXWd7Obh PfKCZJnCYbyNWglKXxAULGsanh6DzScNS9gPuhW+N7WtMnzjH1/B6voPKyJfrcszrOTh 5rJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=yWbqzPFihHt5aZb6HLrgAWT39w7U92pOED1sdEh2zwA=; b=EXvWEgZqY2LFdTN2xDB2D/nXQanI2+H/8l/cL5UAOh1eVrTld6Kopml4n6B9QWsDWj jP7zg28a0Fk90z9uJr5c/xp9QzLIicWjUd7VyESKlloFuymHl4ujK6n24N4XYO7fb6ly stOTFJyyRMcpfCSfalCMBmvX+HJRKhkptnpN7jGIhezEolxbPMC9L4QCtE9uDL8Ufewn KTIgt7Akmd9oG60I/8vBCT6MyRnPR70nyKLH9Yveev+1HaFUr3gTnoB3o9ZiodXPYFnR meneEL5NAUT7582l0Jwdfvugblh3+HhCf6gRnKgf58lz9z73q6MvugHIfV4ykrY9HIsc VZzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=h+taKVQb; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n9si2026379ota.103.2020.03.04.16.36.47; Wed, 04 Mar 2020 16:37:00 -0800 (PST) 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=pass header.i=@kernel.org header.s=default header.b=h+taKVQb; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388565AbgCEAf1 (ORCPT + 99 others); Wed, 4 Mar 2020 19:35:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:52692 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388407AbgCEAf1 (ORCPT ); Wed, 4 Mar 2020 19:35:27 -0500 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 10DC32084E; Thu, 5 Mar 2020 00:35:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583368527; bh=A0B6q9mDysJC9CEiJqkKY3U8/e/cX5VhA8cYED9cPmo=; h=Date:From:To:Cc:Subject:Reply-To:From; b=h+taKVQbSBRSWDF0Q7aHQcp8F8fFOIlDl/Z3rg1xj7YbDd20n3SHfLCV69O/DdsqK dq29DR+6uLzamssXGopylboDp98CoKFzxmnzmxSBDK5cEtugT8L8Juycq/LdLB7Aeo 7Gu0IS5d+B+0oau7p/h3NUMMuq++Sy3htnj+xfMo= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id D98743522731; Wed, 4 Mar 2020 16:35:26 -0800 (PST) Date: Wed, 4 Mar 2020 16:35:26 -0800 From: "Paul E. McKenney" To: josh@joshtriplett.org, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, joel@joelfernandes.org, bigeasy@linutronix.de, tglx@linutronix.de, swood@redhat.com, williams@redhat.com, juri.lelli@redhat.com, linux-rt-users@vger.kernel.org Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org, mingo@kernel.org Subject: RCU use of swait Message-ID: <20200305003526.GA20601@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 Hello! RCU makes considerable use of swait and friends. The motivation I recall was around offloaded callbacks, where in the old days the grace-period kthread might do a wakeup for up to N tasks, where N is the number of CPUs, all with interrupts disabled. This has since been reduced to roughly sqrt(N) tasks, which might well still be too many wakeups to do with interrupts disabled throughout. However, the other use cases have at most one waiter to be awakened. So I am guessing that I could usefully convert all but the rcu_node structure's ->nocb_gp_wq field from swait to wait. Particularly the use cases in SRCU and Tiny RCU. Or is there some other reason why {S,}RCU needs to use swait that I am forgetting? Thanx, Paul