Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1987431rwi; Thu, 3 Nov 2022 11:15:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6VoP5BlHqcgAlpmkO01R0dz4fC4F61CzKMpg/de3WJ3oeUmI0Qs2aMGYdivs0ouPG/PHBr X-Received: by 2002:a17:906:4c4b:b0:7ad:a197:b58e with SMTP id d11-20020a1709064c4b00b007ada197b58emr31077096ejw.203.1667499327000; Thu, 03 Nov 2022 11:15:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667499326; cv=none; d=google.com; s=arc-20160816; b=mQ4ZkCqJOgZgVec1lCknBVJiOoB6bIxbnLQXIlkhvVbhbaPY9GAxNSzFZ60VXBx+fN c23moPLJK2wXFWpezp77tBhdTOtW4uReE+BzXOPOsqbgrqU2I/0jw93LjGwFlbV8k4M+ D22QLI160b6mH5HsEha+tRhB2ZhnLszfyumMSrQYvmVxYc4ScSlGYT6DNGZIGcx66su6 bHxOsqugEHSoAOMQqyIXnH1dz4Fh2pCjjJzZ/CcHrpw7hqnlqNJ3pHQoiBBb6xURlXGu +gD6tkTWyFNLpFoUUGWS6RV/Y/sZKVRyNHC9U88yOCQEFP5O44E5cBaRRPWEGgHyduus s1WQ== 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=KXuDRZ8tTEdoNQUZfErXuoReXLlffpe5lR2AOU4T3TY=; b=LpDqyI14BeTAOEr+BLgBp4G3mEDaC7a91GQc/Cit7pN1l1KVCUZCOspwymLhIhmP3t fgRigruOwayWZGauwFLV2aM6B4HzYwZgbDeQ7MBauBNkwAcgUInxhMdRH1Xxu6DyJ39A 4UtJ7A3WwFgIyPWsPGrNgGIcKIm7DYOLe/sf9rTj6N1RgYouKpuLUpNzo4i/HhvUEZ2h CDxqfZPVMeNsfKX2P3hMaM2s/zj/JJPxPGMU9rP7wOcJTksjPXMAatEhwaau9dafNydP 3Ee4rZgHrWCGEbor0vFVfcEP3jR2YOK7D/kXTwmmC9GN2aNEmByQab6CCZB4r7BW1mj2 5XIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bM+a0APF; 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 e14-20020a056402190e00b004635dccd3casi2573665edz.57.2022.11.03.11.14.59; Thu, 03 Nov 2022 11:15:26 -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=bM+a0APF; 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 S231768AbiKCRwQ (ORCPT + 98 others); Thu, 3 Nov 2022 13:52:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231735AbiKCRwM (ORCPT ); Thu, 3 Nov 2022 13:52:12 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B9441C43B; Thu, 3 Nov 2022 10:52:10 -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 ams.source.kernel.org (Postfix) with ESMTPS id EE461B82530; Thu, 3 Nov 2022 17:52:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96A7AC433D6; Thu, 3 Nov 2022 17:52:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667497927; bh=Zenn+6jbnDODhRSDzC9hBVXh9GHEta/CVzhrCuwWHCw=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=bM+a0APFONgHxxLGMHR74xUMwtAbmWQagYge35W9x3ufuaTzP/XZx8clzl60ayDeM p9QnMLukruWAVK8OMu7V+yzrHdhbefidqHVRin2/KdxKN9mOxu6iOBl+95FXMoeHUL 70BBB3vn+y6IWTNzUg79uNN/jDH6eJFlNwXMMtTigia0xJzLgSe7zSgdPuWnH+IH9g i2WF93WjE+y6nkVpqeITk0XQa9fMkbpel2vhVR+dqQCSvxLxZIF9hhW4HvBIDVPMoZ JKuKl2vCSShnWcAfi02JXqkJc6+xMVz4r8o+bgqq9MPv/1uXEgghT06LxGAWuheREo pGEcZibH+pX4Q== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 3F86E5C097E; Thu, 3 Nov 2022 10:52:07 -0700 (PDT) Date: Thu, 3 Nov 2022 10:52:07 -0700 From: "Paul E. McKenney" To: Uladzislau Rezki Cc: Joel Fernandes , rcu@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC] rcu/kfree: Do not request RCU when not needed Message-ID: <20221103175207.GC5600@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20221102184911.GP5600@paulmck-ThinkPad-P17-Gen-1> <755B5ED1-653D-4E57-B114-77CDE10A9033@joelfernandes.org> <20221102202813.GR5600@paulmck-ThinkPad-P17-Gen-1> <20221102223516.GT5600@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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, Nov 03, 2022 at 01:44:51PM +0100, Uladzislau Rezki wrote: > > > > > Though I am thinking, workqueue context is normally used to invoke > > > code that can block, and would the issue you mentioned affect those as > > > well, or affect RCU when those non-RCU work items block. So for > > > example, when other things in the system that can queue things on the > > > system_wq and block. (I might be throwing darts in the dark). > > > > > > To be safe, we can implement your suggestion which is basically a form > > > of my initial patch. > > > > > > Should we add Tejun to the thread? > > > > Let's get organized first, but that would be a good thing. Or I could > > reach out to Tejun internally. > > > > For but one thing to get organized about, maybe kfree_rcu() should be > > using a workqueue with the WQ_MEM_RECLAIM flag set. > > > It can be as an option to consider. Because such workqueue has some > special priority for better handling of memory releasing. I can have > a look at it closer to see how kvfree_rcu() works if it goes with WQ_MEM_RECLAIM. Sounds good, thank you! Thanx, Paul