Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2318841rwb; Sun, 15 Jan 2023 13:08:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXuEmLHP0e6lNJKP+91oJR6+IXY6MFpZPfeG71/dv8QL3yuErk9gGFwwzKeIdCqCZPk7mtOb X-Received: by 2002:a17:902:8eca:b0:194:8f6b:da42 with SMTP id x10-20020a1709028eca00b001948f6bda42mr2181939plo.60.1673816922303; Sun, 15 Jan 2023 13:08:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673816922; cv=none; d=google.com; s=arc-20160816; b=x0/2J5BGmHOEWsdJofxGG+uRIHo7BVOUWpR4nnG0VMqrz0owmZh+HCaPz+qyqCLuqZ xD7NzV8c+yMwFtI3yazxcBJ8IrN+sc1aMO/hMIkyndGfiSv8ddQkgCPPu0yQ2tivsMhY SOGPCR9+XQEAY24nzp/pm3a/7okovBGrenTwg7e1HuFGpih4Br5lT1SiI3JwRZNov18+ oFr21oQiDe/vphVFYGULrnNm4UGql8U6mRV8VofZArNXddMp5pswdrMjrR5/sQN8o+gM 7jyXgYoGwHLUJkhlEgCXczhXSQdpYNK32Y9BdnkX97bVRXIKvJv2b8eMe8oVJifm2vAq Y9nQ== 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=56WY0ad3meEYLznmmV81lFqh4OVGhJj3OD3kgHWDWYI=; b=gGUGigWulqXUymf1sqZilIL9CpkdKoQZDoJlBhs4z76pqOWSa/MbV53EaveCTyJCTR IFwzCYAaycAoyCDx3BP9WjZN2rDk1wH3bCQUNnc7rnVYvjmnjUa3nA8/2/EEKXGVY6pA Ayn30n9eGisw5IhM1qCUr0ArAMDqes66O2YqSyYkoILGuXi3K9RUGXcLbixf2wGel56y yRV3cy7FbJht+EOlIEgBGRXiArCvMRnV8DU7O6B+ZMNA4PHR+WuYwDIp/7NGqZqt+AXt b60fmpyLT+5b8nAWt4qYm2VZLiA9nu6g1A3p1pfKyh69mQfrYkXlHSHNBcD9MHXEsEk6 K1jQ== 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 f21-20020a63f115000000b00489c72b232fsi32530729pgi.707.2023.01.15.13.08.36; Sun, 15 Jan 2023 13:08:42 -0800 (PST) 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 S231154AbjAOUzL (ORCPT + 52 others); Sun, 15 Jan 2023 15:55:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231150AbjAOUzG (ORCPT ); Sun, 15 Jan 2023 15:55:06 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A24513539; Sun, 15 Jan 2023 12:55:03 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id C3192B80C75; Sun, 15 Jan 2023 20:55:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A746C433D2; Sun, 15 Jan 2023 20:54:59 +0000 (UTC) Date: Sun, 15 Jan 2023 15:54:55 -0500 From: Steven Rostedt To: "Joel Fernandes (Google)" Cc: linux-kernel@vger.kernel.org, Josh Triplett , Lai Jiangshan , Mathieu Desnoyers , "Paul E. McKenney" , rcu@vger.kernel.org, fweisbec@gmail.com, urezki@gmail.com Subject: Re: [PATCH v2 rcu/dev 2/2] rcu: Disable laziness if lazy-tracking says so Message-ID: <20230115155455.0fb66c12@rorschach.local.home> In-Reply-To: <20230112005223.2329802-2-joel@joelfernandes.org> References: <20230112005223.2329802-1-joel@joelfernandes.org> <20230112005223.2329802-2-joel@joelfernandes.org> 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=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS 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 Thu, 12 Jan 2023 00:52:23 +0000 "Joel Fernandes (Google)" wrote: > > static void > -__call_rcu_common(struct rcu_head *head, rcu_callback_t func, bool lazy) > +__call_rcu_common(struct rcu_head *head, rcu_callback_t func, bool lazy_in) > { > static atomic_t doublefrees; > unsigned long flags; > struct rcu_data *rdp; > - bool was_alldone; > + bool was_alldone, lazy; I'm curious to why the the extra variable. > > /* Misaligned rcu_head! */ > WARN_ON_ONCE((unsigned long)head & (sizeof(void *) - 1)); > @@ -2622,6 +2622,7 @@ __call_rcu_common(struct rcu_head *head, rcu_callback_t func, bool lazy) > kasan_record_aux_stack_noalloc(head); > local_irq_save(flags); > rdp = this_cpu_ptr(&rcu_data); > + lazy = lazy_in && !rcu_async_should_hurry(); Wouldn't just having: lazy = lazy && !rcu_async_should_hurry(); be sufficient? -- Steve > > /* Add the callback to our list. */ > if (unlikely(!rcu_segcblist_is_enabled(&rdp->cblist))) { > --