Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp124203rbe; Wed, 28 Feb 2024 14:32:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWINDYAS/crBbiiiXVk00zgxtZRKajG00Z8ygkR/oiNo81N1ebLJH+tNrZNH5gO7hFg11V75HNAPcK4x/5cRx/mb1ZKI3ki4aK9fUJVcA== X-Google-Smtp-Source: AGHT+IFIph6nmrdHj96mxE04/pwQMkgIb7CEwEFAI4VDQj88/HXoUTDycGSXOoGu3FRt83RIaqMD X-Received: by 2002:a05:6808:985:b0:3c1:862d:7e2e with SMTP id a5-20020a056808098500b003c1862d7e2emr356229oic.50.1709159533837; Wed, 28 Feb 2024 14:32:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709159533; cv=pass; d=google.com; s=arc-20160816; b=rwUJx2vwtmJ0ML4QHZ215Ia4+JpGtpkysBYEziULiFgH38AmxzBEHDVFFo2m/Gk55d H5+IdVpUvhJz5f1ezlsqgdL8seCh83ymnk0SewxePYvv4sRxKCtfVutIK7SwS+H+a4uZ mWPI6X/wfcU/4/wX8tYJhLi2V9QlQaxDhPLcDzf60CN/XwkQxlXYoLOkmcvZmVvI0oT+ eLKU1XhoUE2NSFnxhWLLzC2L5DCWlqYgzmdUgP/h6N6YypesajgQ6nwZ+obD3wcSLlL0 CS8iwuO9Id/mK2GI53eSNan9AqVZwvhno+mmuPpv+FoTJ2ghz8zze6cXTpWx4gyURLnJ tnXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=oY8orYRmuGQD5z28yYc+yDbS+pAjqwG84CJCQiHUPmA=; fh=Qh6CuKSZ76B0R3zWCV0cmnRgxKhmxkZA29FEx0WE8E0=; b=WjduSsk8PueSWVYP6alZkncQwWmz5H4fnxLxicbLW7IVNk0uqdGgb9V8CyQeSHrlsq Fgjk0fqaJ4zL50rcoQfO1VhMHRV+nESHU5RNZf2zSlZIN/UfMs8qBwUuHJn75Kvfpu8w urROOPBgKe0BEsyXDLzPaYmwgAEYhEyOZW3p9AYj0+RblTUbFfiFtl6h9ohC6HQKRmIN u5+oA7m5Vczlz9PiXQYP3iCH5NXx0X4qudxC5PZTcQIMgJTay08w/UMr2vn8Z7im8EVA M0oXMjxO+eSyKmFxe7ozS3+giLLwXUU8M0pEoMQcBfVAdP8oc6HjXRWSqHHqFsPw3F2l 9x3Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-85788-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85788-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i190-20020a639dc7000000b005e19d15689bsi384608pgd.819.2024.02.28.14.32.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 14:32:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85788-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-85788-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85788-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C01082854DB for ; Wed, 28 Feb 2024 22:31:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B580B70051; Wed, 28 Feb 2024 22:31:06 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2425C16423; Wed, 28 Feb 2024 22:31:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709159466; cv=none; b=DAyld/qc+Pw9OFlLUZeDl7IY9oKiG11tRntRMyEeqRu0a2tlpR4IW/QgKROmw44AwL3CIpZTGjLPt0NeI4TrmVxgd9Ay+KXtN6MyWwSMbs2vUNT7Iq6d1zehfph9D0f7K4yw6/SDMAG5XtghQvENoQ6FaY47niU/r8/OU852a5A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709159466; c=relaxed/simple; bh=lsoEUwVdzDJU8AO/Ssmxi6hs4UEIghre58Da9e/5tt8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PqLfpTjLE5ZQCm2+i0YjLGMtL+JvdToIYuoI2j8pxiiv7cPBkVu7WZjKK7b2pxp/fNZsxtWl3KNWNOE04yWaN3miMEtqbSTqthre/flDZy59MMJHSew0SQHmDxEuRU18do82jFXarhxquycvcZwvAbhAYh+XAxT466+EuLOlAqI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61490C433C7; Wed, 28 Feb 2024 22:31:03 +0000 (UTC) Date: Wed, 28 Feb 2024 17:33:07 -0500 From: Steven Rostedt To: "Paul E. McKenney" Cc: Joel Fernandes , Yan Zhai , Eric Dumazet , netdev@vger.kernel.org, "David S. Miller" , Jakub Kicinski , Paolo Abeni , Jiri Pirko , Simon Horman , Daniel Borkmann , Lorenzo Bianconi , Coco Li , Wei Wang , Alexander Duyck , Hannes Frederic Sowa , linux-kernel@vger.kernel.org, rcu@vger.kernel.org, bpf@vger.kernel.org, kernel-team@cloudflare.com, mark.rutland@arm.com, Alexei Starovoitov Subject: Re: [PATCH] net: raise RCU qs after each threaded NAPI poll Message-ID: <20240228173307.529d11ee@gandalf.local.home> In-Reply-To: References: <02913b40-7b74-48b3-b15d-53133afd3ba6@paulmck-laptop> <3D27EFEF-0452-4555-8277-9159486B41BF@joelfernandes.org> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 28 Feb 2024 14:19:11 -0800 "Paul E. McKenney" wrote: > > > > > > Well, to your initial point, cond_resched() does eventually invoke > > > preempt_schedule_common(), so you are quite correct that as far as > > > Tasks RCU is concerned, cond_resched() is not a quiescent state. > > > > Thanks for confirming. :-) > > However, given that the current Tasks RCU use cases wait for trampolines > to be evacuated, Tasks RCU could make the choice that cond_resched() > be a quiescent state, for example, by adjusting rcu_all_qs() and > .rcu_urgent_qs accordingly. > > But this seems less pressing given the chance that cond_resched() might > go away in favor of lazy preemption. Although cond_resched() is technically a "preemption point" and not truly a voluntary schedule, I would be happy to state that it's not allowed to be called from trampolines, or their callbacks. Now the question is, does BPF programs ever call cond_resched()? I don't think they do. [ Added Alexei ] -- Steve