Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3956387pxb; Mon, 4 Oct 2021 13:38:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2qi+GYAMJBXgYwzj8izwnRyFR2OqjRtO10utJ5CNBtiNvv1ttitlQ1xnnFb6b+ml9Cp3Q X-Received: by 2002:a05:6402:2552:: with SMTP id l18mr20846499edb.132.1633379898898; Mon, 04 Oct 2021 13:38:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633379898; cv=none; d=google.com; s=arc-20160816; b=yj179pb1ctFkvYc1VWDxx+acInjkzJT4vQ0ezBFwwSvZnM23gx5N1Y7S8sHR4dBhrK Q3FDgWu7g9FUZ+j9AGAsn9leUNl01YZM1cr7cIq9ya3W7eXcc9yDjTrnWp5/gN8AhROK 1TIZf7NhfBQVZwqxNjtCiDMQJYOW1ZIxP5VTg4pzR46IeEgA7QC6VxWkBk5AozwmOIrH sGCOuBpGOtbLX5Qk0B/jD+BVN2Qy0o+fs/rbPZ256QZgZXQndGT63+DO4IhxeabvDtht byHcP0erHbQxVfsV/U95Kpj3LgfwUTCBVxuHksqaSk+zXKiIfUeyyikuVLzpCokbN6Pr uHSg== 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:message-id:subject:cc:to:from:date:dkim-signature; bh=jcJ3LCbyxAJwWf0WiYZRb9FfKRLt29/D8CpwupZ22MI=; b=VABwF4ocT/iJdmJq97dYesiQIVFVFm4BMr4PKy+Z9k9x2wc0ymBRH1iL80BgCtY4ay ssSBBTbQFtlBRoYQQwhL1h6Ppx6V0pW20wYL/K1SO/OlwmOVwKr4Z6vTZMQ971BzCzFM /nSVg3EnLSJjF4UNDEAOjOBfP692R/j5HNPBAyS5j6z1503W0FS97irLvvpT6/6dSNDw m182nayqMk69fK5oeYpwkYwWMLUPvkpVTyVFK3L91VQ4voOo2VV5wU8WLHBIPNr+sORp hmxENLMfphGIf96oOsU0WS1LXi6SmBSFNPtsG4UzaYN3UZhYn2gnw4WypIUulDwKKlpv J6Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i0wOPEX7; 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 ec20si18955593ejb.166.2021.10.04.13.37.54; Mon, 04 Oct 2021 13:38:18 -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=i0wOPEX7; 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 S236515AbhJDNer (ORCPT + 99 others); Mon, 4 Oct 2021 09:34:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:46660 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235098AbhJDNcp (ORCPT ); Mon, 4 Oct 2021 09:32:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7B242619F5; Mon, 4 Oct 2021 13:14:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633353288; bh=hODNmxSSaaHr3OC4EIv08au/aKqXNrYAxsD5uypDWt0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=i0wOPEX7XWB4Ep3Bly6qwKTm12w3G4JMNNRTQuW9u3C6lNtdKEl1AWi/CdsJBLs+J 1iG9qn8HDcY1Fal2OHMdWLbOkcXHYRhfS0ypTDxLXk6LnT5ll7vplOrYzd7NuO33Du G8/9bKdudjQU33Q6Jt8fEJxSiLAXutbEdgyOhKjG0MpruN5qCxJvI7Zy3uoPVkmtW4 rkMydmfM5J/qYdIsj47dK9yzd/2daMaTFlyqntpiK2NTUNIy/O95oVG08OhyDrN9cw qULPyz2nUS4zj0Tbuae9ejzucxfML/jYeQ4MIqECyP5dvXW6nd/abpkvxu9NaKsvaq MTGJ8MK9I5t+Q== Date: Mon, 4 Oct 2021 15:14:45 +0200 From: Frederic Weisbecker To: Valentin Schneider Cc: "Paul E . McKenney" , LKML , Sebastian Andrzej Siewior , Peter Zijlstra , Uladzislau Rezki , Thomas Gleixner , Boqun Feng , Neeraj Upadhyay , Josh Triplett , Joel Fernandes , rcu@vger.kernel.org Subject: Re: [PATCH 05/11] rcu/nocb: Make rcu_core() callbacks acceleration (de-)offloading safe Message-ID: <20211004131445.GA273854@lothringen> References: <20210929221012.228270-1-frederic@kernel.org> <20210929221012.228270-6-frederic@kernel.org> <87a6jsmy6o.mognet@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87a6jsmy6o.mognet@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 01, 2021 at 06:50:39PM +0100, Valentin Schneider wrote: > On 30/09/21 00:10, Frederic Weisbecker wrote: > > When callbacks are offloaded, the NOCB kthreads handle the callbacks > > progression on behalf of rcu_core(). > > > > However during the (de-)offloading process, the kthread may not be > > entirely up to the task. As a result some callbacks grace period > > sequence number may remain stale for a while because rcu_core() won't > > take care of them either. > > > > But that should be taken care of at the tail end of the (de)offloading > process, either by rcu_core() or by the NOCB kthreads, no? True but the (de-)offloading process can take a random amount of time to complete. During this time if the queue of callbacks is already huge, things can explode. > > Or is it e.g. in the case of offloading, we want to make sure an rcu_core() > invocation runs callback acceleration because even if the NOCB GP/CB > kthreads are being set up, we're not guaranteed is going to do that > straight away? Right. > > IIUC it would be a similar case for deoffload when we stash the NOCB GP/CB > kthreads and get rcu_core() running concurrently. You got it! Thanks.