Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6096306rwr; Mon, 24 Apr 2023 13:44:11 -0700 (PDT) X-Google-Smtp-Source: AKy350YHbdPAnOhhs4EYLYUIC/SjkSDUR1r+sKEY4eY5ZABuyTqzm2SHNZg+jWGGi/K4eSGj2Yzm X-Received: by 2002:a05:6a20:431c:b0:ef:ed72:779c with SMTP id h28-20020a056a20431c00b000efed72779cmr19660658pzk.8.1682369050828; Mon, 24 Apr 2023 13:44:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682369050; cv=none; d=google.com; s=arc-20160816; b=XaM6hXhQJxFBDFnOC95T6nu7llGrhHf9WLr+IcSIjUsVhiIO7wEs/oNXn/DYJM9n5c asQbuE85z+AlnfkcYCPERyfkCDvIBhB50Y3Jtc2koTe5XNGFfdZG/jvbZ6oJOwgt3dPg LyHighn7Aye1Ajh0Z0FObuS9SoQujffLzCDs+RMlLrr9VkZXiRyTEr20Ykb4jqQOaUeF J48OQ4MA/tDMV1QT8eqtER+ehjr/mnUpUg94xvq2/N3bsfi1mG0cPyIVpd8l2HPu5G6u Yxmu+4wiD7Fh2kTai6f6e6BuXkd7qBeyTXDi3sORD7JlE5dLhfY1Ls9Za7muj61XD0Ff kv2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=tfif6zYlnx3AQUMFtYfP0zF8CKJyWM82X3UOgAxWXMk=; b=O02EV8wbeIiIH8+hXtaZO5pbfbar5z3gPaF+9LJ8DOgzttqjDgwLjaMpg01SeJ/Bj4 Lz7dgKWJBylRw14uNC7pRWlCsL0xeqqTyd+jCYDw7i9GUnDLnxwIRiTaGnBVlor6oYDC 4WVYeCd3zoftDohZi9duxSsBL9uQ0h+OL+ntSdzrQ3wkBrNdegdHo0GJU/U0bGiLh785 qjCAxF73jpZ7GzukCqMQrWR0p64WrdsY2EpeM9R8dCIcnKB2Uc4apgYdaCnlOBxT/7t3 AdJva64CBxWExAUeBTvzLPfOtuk7OS6INFDkUWl0y5NiJkrlRIOc4CH95IPiwXEQMDp2 P8mA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y5-20020a633205000000b0050fae6024f8si12062948pgy.792.2023.04.24.13.43.39; Mon, 24 Apr 2023 13:44:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231985AbjDXUe6 (ORCPT + 99 others); Mon, 24 Apr 2023 16:34:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231687AbjDXUez (ORCPT ); Mon, 24 Apr 2023 16:34:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCCE455AE; Mon, 24 Apr 2023 13:34:54 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 58F25628A1; Mon, 24 Apr 2023 20:34:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF613C433EF; Mon, 24 Apr 2023 20:34:50 +0000 (UTC) Date: Mon, 24 Apr 2023 16:34:38 -0400 From: Steven Rostedt To: "Paul E. McKenney" Cc: Wander Lairson Costa , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Will Deacon , Waiman Long , Boqun Feng , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , "Eric W. Biederman" , Michael Ellerman , Andrew Morton , Oleg Nesterov , Kefeng Wang , "Liam R. Howlett" , Kees Cook , Christian Brauner , Andrei Vagin , Shakeel Butt , open list , "open list:PERFORMANCE EVENTS SUBSYSTEM" , Hu Chunyu , Thomas Gleixner Subject: Re: [PATCH v6 2/3] sched/task: Add the put_task_struct_atomic_safe() function Message-ID: <20230424163438.06cc880e@rorschach.local.home> In-Reply-To: <105084b0-9d65-4896-97e4-35ef3c6f1fae@paulmck-laptop> References: <20230414125532.14958-1-wander@redhat.com> <20230414125532.14958-3-wander@redhat.com> <9ff7ea3a-b48b-4cff-851e-179713393531@paulmck-laptop> <105084b0-9d65-4896-97e4-35ef3c6f1fae@paulmck-laptop> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 24 Apr 2023 11:52:52 -0700 "Paul E. McKenney" wrote: > > softirqs execute in thread context in PREEMPT_RT. We are good here. > > So the sleeping lock is a spinlock rather than (say) a mutex? local_bh_disable() on RT basically turns into: local_lock(&softirq_ctrl.lock); rcu_read_lock(); Which grabs a per CPU mutex that is taken by softirqs, and also calls rcu_read_lock(). This allows bottom halves to still run as threads but maintain the same synchronization as they do on mainline. -- Steve