Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp445210pxb; Wed, 6 Oct 2021 08:15:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysHCRfaD6iJwEbVH2WjDQ88zg2STmKH2UVepLSmC1dYA3Z1MYBnrdMUTPoMWzQJhm2uV2f X-Received: by 2002:aa7:cf8d:: with SMTP id z13mr28645398edx.77.1633533334934; Wed, 06 Oct 2021 08:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633533334; cv=none; d=google.com; s=arc-20160816; b=zNR1WlZmickQVrv/472jz17wG0LX0Gw4qTFl1TFTbwUKYUEfVPsJrczImS3wvHKURk XkqtcmYfP0RSHIdK20xNNsk1PddrapEpiyZsY1IS8oYClIeZYkeKinjsW8/CR4Jlef50 4mOYoNWHLf8A/yoCLUhGf4rCETNNdDIhiIIj5rL1ePvjhSWxkTMaUQheyN57pEB8S2E2 GOBHYByyvxjfBAeGxnMXyiANi8rHaXz/HWuEm6zwm8FqiKHlBThnC/4W8TL2pEs0gBpu CBopDPzMu0PE9azv1NhyNvLDz1QcqvudMrGoh4CLqXFonHtDosHh4/waSIlujyzMkZkf cGzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=O79KbfAQ7+uG+1QEZ9t0rlKtjDr1Ynt36KYHbIHH4Xg=; b=NnhjmwQOwqLnhy7FoPNtdQW2jkZAtc8mS94TiQVHfuMFyQ/LcEazjyq+82OTkFrNK6 L+Wv/M1eysjv5iostN4E/w+sNxP7l+OD/7mYV99yh3ffNvRVNg9KjZBgvahnPitA5sIG FyXvZPufC2+f4+CFET6zFzTLU0QfregBvltyVp95OwRADMz+18A4RyXD16uVT/7NQDxN I/bLEO7xJZFXXnAIjqlLMU9c00nU9ap11WXJOkukrciAyJFN73jazIbHz7L7WtceEevH eKukyGkh3+nkviEomSjVMo7iVrxWeesQ16ToWgL60CO2BHcmJlAYXbfMMpDldmLwokYp tnjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tLu9Cimr; 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 r11si4550720edd.326.2021.10.06.08.15.10; Wed, 06 Oct 2021 08:15:34 -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=k20201202 header.b=tLu9Cimr; 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 S239051AbhJFPPc (ORCPT + 99 others); Wed, 6 Oct 2021 11:15:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:53940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231883AbhJFPPb (ORCPT ); Wed, 6 Oct 2021 11:15:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 61DD460F41; Wed, 6 Oct 2021 15:13:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633533219; bh=EVmb4kirYxxRbhN6bHVfWsWVSxxibQUQbKgIpq0U4Lw=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=tLu9CimrveddQ6EYZLM8TvjgiGwPNRa3iBI4to+CyqdiiMopEwFVgsokgXcp7q4g6 wpW4xmB5/BqJSe/ZM81DDY4U9W2wsCgGbRBwBj8rhFfKFVJUK5fEACVwOXTyVuzQP5 5Ywh/ksp6sHT5oE7g75/rjZlhJERX+b215DYPjbcyqFMgrA+ZRU0oBaiN0a931/KF/ n/oXh2+XYyp1ztY1OYlI0W2+KOndny56k09uIqRdVPFDx7QcPJRvbM4Qm224P3zgIQ LqCW86rcs614M1RAUy69icLG+d+KwG66Q38Fh1MH+Fp7o13McchLvC9SY3vAPwhFTM 8ZYX6tDBOCpUg== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 31A935C0800; Wed, 6 Oct 2021 08:13:39 -0700 (PDT) Date: Wed, 6 Oct 2021 08:13:39 -0700 From: "Paul E. McKenney" To: Frederic Weisbecker Cc: LKML , Sebastian Andrzej Siewior , Peter Zijlstra , Uladzislau Rezki , Valentin Schneider , Thomas Gleixner , Boqun Feng , Neeraj Upadhyay , Josh Triplett , Joel Fernandes , rcu@vger.kernel.org Subject: Re: [PATCH 00/11] rcu: Make rcu_core() safe in PREEMPT_RT with NOCB + a few other fixes Message-ID: <20211006151339.GA422833@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20210929221012.228270-1-frederic@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210929221012.228270-1-frederic@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 30, 2021 at 12:10:01AM +0200, Frederic Weisbecker wrote: > PREEMPT_RT has made rcu_core() preemptible, making it unsafe against > concurrent NOCB (de-)offloading. > > Thomas suggested to drop the local_lock() based solution and simply > check the offloaded state while context looks safe but that's not > enough. Here is a bit of rework. > > git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git > rcu/rt > > HEAD: aac1c58961446c731f2e989bd822ca1fd2659bad Many of these look quite good, but any chance of getting an official Tested-by from someone in the -rt community? Thanx, Paul > Thanks, > Frederic > --- > > Frederic Weisbecker (10): > rcu/nocb: Make local rcu_nocb_lock_irqsave() safe against concurrent deoffloading > rcu/nocb: Prepare state machine for a new step > rcu/nocb: Invoke rcu_core() at the start of deoffloading > rcu/nocb: Make rcu_core() callbacks acceleration (de-)offloading safe > rcu/nocb: Check a stable offloaded state to manipulate qlen_last_fqs_check > rcu/nocb: Use appropriate rcu_nocb_lock_irqsave() > rcu/nocb: Limit number of softirq callbacks only on softirq > rcu: Fix callbacks processing time limit retaining cond_resched() > rcu: Apply callbacks processing time limit only on softirq > rcu/nocb: Don't invoke local rcu core on callback overload from nocb kthread > > Thomas Gleixner (1): > rcu/nocb: Make rcu_core() callbacks acceleration preempt-safe > > > include/linux/rcu_segcblist.h | 51 +++++++++++++++++++------- > kernel/rcu/rcu_segcblist.c | 10 ++--- > kernel/rcu/rcu_segcblist.h | 7 ++-- > kernel/rcu/tree.c | 85 ++++++++++++++++++++++++++++++------------- > kernel/rcu/tree.h | 16 +++++--- > kernel/rcu/tree_nocb.h | 29 ++++++++++++--- > 6 files changed, 136 insertions(+), 62 deletions(-)