Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp1800133rwp; Thu, 13 Jul 2023 17:21:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlFkPt3XauBGkFvEYbqBVlGBMIJeTpOBLgpDSkcczqe0EjxvfHpiAKYyvrHXutO2mtrRybN4 X-Received: by 2002:a17:903:32c6:b0:1b1:9d43:ad4c with SMTP id i6-20020a17090332c600b001b19d43ad4cmr2586985plr.40.1689294060337; Thu, 13 Jul 2023 17:21:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689294060; cv=none; d=google.com; s=arc-20160816; b=JZ6PYJ0/jvxyHM6Dq1JywOqX+d1lBBEo5XHT81b0K1bpNUSsrYHEdHMFfD9gakFOSx +9eilSvF03AEE6ZnTy/RMAeCO5jcObLIhAr8XC+rMudq6zMV2Vt2x88Y9gBnBRtAM1TE gRcWsNbVE8BVw82TcPOci7PCZHf4ZkqfQNkx3Qfttq2SqhkytEvfj5p+A6mvQztK4BZQ T827JwFSOUrTqe6QF9NVeOJ4IQNJCzSzBZ/QnBSQa8UW7NA8iydhYfndeaziQrtQom9E p9SRHrYFKaQxqk/I/yX2tvjQOwRBtZD0ajTcoOA717yh1ho7mZHZ6bym+yRsLEHiAeJQ o1qA== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=3QlRVk605JwGDrmfJZBLGxN39w/iFtlCMmRh7Z3JZ+E=; fh=a96VmVcVuxhfh5bs3K1VvKwOKL/VZVAhlV7F51FIdbc=; b=N5OWtErXf1ARbCsmOEVEz/4lmtvchUe6jrJ8zjdb+VC49daKuXckUT3bYEtYOULSxZ dC1C9TKbN2aK9TB3TY0GvOEoDtyHaNWFcFYpKF/MhQpkINh5mc7WJhqg4Sj/zg+NyMJj 1VVwfhisd3aLNG335xB1POArGnzVLjHKEh2vwPEsVg+eXFPHdnPhG+nTfNAAjkb7KUAp 4MGAq4aw3/fTyn4VILe3vPLkbo2PU6jkmU0C3X+1qhjgVOTARixZtLY4rvrwHw219Z5R wDz58k/j/UnCCxX21dRzH6Beznn/3gT+ESn5DoWPO3nC4aD1YbhMQFIyMXvrzzpc9IJ3 s8pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dGIlaA5A; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m9-20020a170902e40900b001b7f849cd19si5955102ple.353.2023.07.13.17.20.43; Thu, 13 Jul 2023 17:21:00 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dGIlaA5A; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234290AbjGMX2z (ORCPT + 99 others); Thu, 13 Jul 2023 19:28:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231303AbjGMX2y (ORCPT ); Thu, 13 Jul 2023 19:28:54 -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 4B34E269F; Thu, 13 Jul 2023 16:28:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C790261B9A; Thu, 13 Jul 2023 23:28:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22CB0C433C7; Thu, 13 Jul 2023 23:28:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689290932; bh=NDO2P9+RW636wRRXRtr7gwSzDOuhmqm37GP4lCYn9IY=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=dGIlaA5ACD0zbItZfFo5zQ6YW8m63CwBqa6iBL/EIvMwzkmxhHy+Vt3QD8Lfj7jv6 +fHfJHVFhTJdNfg5s5cdqxNKOIRV7F7i8HYgG/43RP555xzqsSgDENBiG7OgYpNryt T4cKkUq0aiidOcxwlqsNmggDCaHZ6gHu4q5trruYmW7pRd6WVa6oau9CYZrDizqRyn U4z+XzLF3eaHAqJqMD1hLDIgzF2Md6RtjNXqlwJg/lNjSqEKy7kov61csq8rWYh6nB nrqqJW5OO/Gjv6m2PDxGNl1tXJkRwpzr8ff+GZi1TaqQ5k0rLy/U9s7+ZlxJWP0k3b ts0UG7Hq1otEQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id A2BA4CE009E; Thu, 13 Jul 2023 16:28:51 -0700 (PDT) Date: Thu, 13 Jul 2023 16:28:51 -0700 From: "Paul E. McKenney" To: Sandeep Dhavale Cc: Joel Fernandes , Gao Xiang , Frederic Weisbecker , Neeraj Upadhyay , Josh Triplett , Boqun Feng , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Zqiang , Matthias Brugger , AngeloGioacchino Del Regno , linux-erofs@lists.ozlabs.org, xiang@kernel.org, Will Shiu , kernel-team@android.com, rcu@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH v1] rcu: Fix and improve RCU read lock checks when !CONFIG_DEBUG_LOCK_ALLOC Message-ID: <906e7981-9da2-4b3d-b200-aad7c8057bef@paulmck-laptop> Reply-To: paulmck@kernel.org References: <894a3b64-a369-7bc6-c8a8-0910843cc587@linux.alibaba.com> <58b661d0-0ebb-4b45-a10d-c5927fb791cd@paulmck-laptop> <39923da8-16a1-43a8-99f1-5e13508e4ee4@paulmck-laptop> <32b8c9d5-37da-4508-b524-fc0fd326c432@paulmck-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Thu, Jul 13, 2023 at 04:08:29PM -0700, Sandeep Dhavale wrote: > > > > Sorry, but the current lockdep-support functions need to stay focused > > on lockdep. They are not set up for general use, as we already saw > > with rcu_is_watching(). > > > Ok, understood. > > > If you get a z_erofs_wq_needed() (or whatever) upstream, and if it turns > > out that there is an RCU-specific portion that has clean semantics, > > then I would be willing to look at pulling that portion into RCU. > > Note "look at" as opposed to "unconditionally agree to". ;-) > > > > I have no official opinion myself, but there are quite a few people > > > ... > > > > > > Regarding erofs trying to detect this, I understand few people can > > > have different > > > opinions. Not scheduling a thread while being in a thread context itself > > > is reasonable in my opinion which also has shown performance gains. > > > > You still haven't quantified the performance gains. Presumably they > > are most compelling with large numbers of small buffers to be decrypted. > > Maybe you missed one of the replies. Link [1] shows the scheduling overhead > for kworker vs high pri kthread. I think we can all see that there is non-zero > cost associated with always scheduling vs inline decompression. Heh! A reply I was not CCed on back in February. ;-) But data like that included directly in the commit log, gathered specifically for that commit log's patch, would be very helpful. > > But why not just make a z_erofs_wq_needed() or similar in your own > > code, and push it upstream? If the performance gains really are so > > compelling, one would hope that some sort of reasonable arrangement > > could be arrived at. > > > Yes, we will incorporate additional checks in erofs. Sounds good to me! Thanx, Paul > Thanks, > Sandeep. > > [1] https://lore.kernel.org/linux-erofs/20230208093322.75816-1-hsiangkao@linux.alibaba.com/