Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1609091pxb; Mon, 11 Oct 2021 09:24:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZzAxMulnYAoQfnqhIsgs5QhLoIzPCA2IKZ71q4Ah/9OFVwjQ+jcW8gTmDjK1pkJWCOh+k X-Received: by 2002:a17:907:2d23:: with SMTP id gs35mr25962478ejc.364.1633969480021; Mon, 11 Oct 2021 09:24:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633969480; cv=none; d=google.com; s=arc-20160816; b=S6HQJw8YlztcmcTjVT178KCDKu8XpqciZSzBFahj+9GehkBBo7UnIEljQW50u6b/mD Ld/Xt/g51Ymle4HLYQRJiw0m5dvmd2QzssS5Pu5teuNV0xN5ON+cFzkBIVtXfR5SQxRM zr2QPNnRQYXVbInjggCtt0+b3rRXWiCEF3OzXoSotmHFE64pUTzhzz0x6uPSLRaolhC1 L0oVDrSYk3GvCUWff5xyX9TAmsH7TEGvT/RZyPbCj4+fIJxWc2+ReoYX5rkN60iauzyC /RJ6inmoFwTYYKJVftbCkilV9mvV2EWI4/E/SrogDyfDXzHPI9Gb20cnqJ+PGchHfNJc UhnA== 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=jJbLHD7hgapGhosAGojppXLgy0eouOX4Ht/QM1fm+fM=; b=jcMa+jiIDJyGb15AGfHF7Qq9pKQH8+G6+Lu5NH96ozlebWH8BivfleSOEGmadc5lHt ltCcfq92y7jeHNMWja5Xq70cX7rABSH7H7Rmm0tzag6Re/ckLvcCjuzaxILvyUysSeHk KRn4xrZB7CEyaQz93SDt0eG3r5qo+CNxQ/ueXsCeXwK9NqtxALvCeB4uN/F4t6jUF2cP VIqMACvBVGmXkd1IoCUNIAt+muULWx6ZiULdpkj4hLQC2vtCtINEtaqu97AQ7ZhT5Xc6 GxPJxOYyofJdJbjm72BBXpKog/6dWEpjp+8y0lAqcw1wzLe7TehO+fadHazHvzMl3hhR csvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FHT4R6ga; 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 j3si12153498eje.51.2021.10.11.09.24.16; Mon, 11 Oct 2021 09:24:40 -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=FHT4R6ga; 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 S234822AbhJKMNZ (ORCPT + 99 others); Mon, 11 Oct 2021 08:13:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:46398 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234675AbhJKMNY (ORCPT ); Mon, 11 Oct 2021 08:13:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 45C2760F43; Mon, 11 Oct 2021 12:11:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633954284; bh=VCXL4haLuEdl2ezsWpP7xi+X3JHonnQj0T15oagIj5I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FHT4R6gaIXpCLygnbwBo7e82aE/NtJToMylVtyuQ7XJXj9FFfQ3wLLw+VCmS03Jy9 9GgKtn/6L/UgjYGpP4SDIiLURGhkttilgRZfRLCGnuFTPZ6dqPw9iSJB3ObDqAS1XE Qr1gZSWaUmAm5hB4w+dJk5YDjz/LePYlRLS2WHMmmrq3jx+qruYxpdtrJEBhpAua0o vsgdHaRB/fJXQ+7XCs6++KkKNr+TlY8xu268iCVZsxowbfLOUTvSOQLdfWs47KkE+W QjJkxfU9LAiWMlNCIEKe3XU6VCGfS05xPokb3xXeAU4YmPu/l5DT0CLL3HP4sR5d2e 1F46PkBS/UrUA== Date: Mon, 11 Oct 2021 14:11:22 +0200 From: Frederic Weisbecker To: Sebastian Andrzej Siewior Cc: "Paul E . McKenney" , LKML , Peter Zijlstra , Uladzislau Rezki , Valentin Schneider , Thomas Gleixner , Boqun Feng , Neeraj Upadhyay , Josh Triplett , Joel Fernandes , rcu@vger.kernel.org Subject: Re: [PATCH 11/11] rcu/nocb: Don't invoke local rcu core on callback overload from nocb kthread Message-ID: <20211011121122.GA356339@lothringen> References: <20210929221012.228270-1-frederic@kernel.org> <20210929221012.228270-12-frederic@kernel.org> <20210930153737.lljjay2cquph7cfv@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210930153737.lljjay2cquph7cfv@linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Phew, the last changelog is the most careless... On Thu, Sep 30, 2021 at 05:37:37PM +0200, Sebastian Andrzej Siewior wrote: > On 2021-09-30 00:10:12 [+0200], Frederic Weisbecker wrote: > > rcu_core() tries to ensure that its self-invocation in case of callbacks > > overload only happen in softirq/rcuc mode. Indeed it doesn't make sense > > to trigger local RCU core from nocb_cb kthread since it can execute > > on a CPU different from the target rdp. Also in case of overload, the > > nocb_cb kthread simply iterates a new loop of callbacks processing. > > > > However the "offloaded" check that aims at preventing that is wrong. > - that? Rephrasing the changelog: "However the "offloaded" check that aims at preventing misplaced rcu_core() invocations is wrong." > > > First of all that state is volatile and second: softirq/rcuc can > > execute while the target rdp is offloaded. As a result rcu_core() can > > can what? "As a result rcu_core() can be invoked on the wrong CPU while in the process of (de-offloading)." Thanks! > > > Fix that with moving the rcu_core() self-invocation to rcu_core() itself, > > irrespective of the rdp offloaded state. > > Sebastian