Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2113405pxp; Fri, 18 Mar 2022 03:38:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyC5nCr3vc546ypIiEvZWGrUMFyn/toxcqfdpTSzsNQD14MfwB1HY7zubdZA0QoEpW3ZgDW X-Received: by 2002:a05:6402:516c:b0:419:92c:a2a with SMTP id d12-20020a056402516c00b00419092c0a2amr3160393ede.175.1647599910178; Fri, 18 Mar 2022 03:38:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647599910; cv=none; d=google.com; s=arc-20160816; b=co+8hY+jmww08ebAUTMcCceJQdctnuiDHKPbcNmSWQaQKjOMdNYFhDxaCbKiJjkZug J0mvDfxxv+JsRnle4JocyXHK3/dIU5Wn5XqCtAE/Rv2xQV2ivBcm1oSKJZ9R/a+jfclY zx1CieFVb1llpncXuKh6LmJZ3bRX4l+F+W5fZZZxJCOzxnJ9ClXyT9BPAsGXvGYU6+/P YASaW4bjz/DaZR/m5J7Xk5TpHB0V6/eo5RcYXZOvr23zlOyd6flEmmZhEUdZG0FLg+eI 6LwegGnN66oxm6N9sL65lMs9Z134TuOPGMTK8DP+cgW8wCIDHO5iDcCkthFmFt9nwU8/ FI4A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=jQELzme3UEUmwBo893kUStJaG9sEY9U4bgJ/BG3jvf4=; b=DzgV4B+hwtNprHZLKi/aDC3m6Q2cK3yZvdgkd5XA8kSXojVBl+cMKrfwJLhAtjMZLy mqY0JW4lcA7q5yN6SiFQ8VI6+ioO4pdfkbdXsMwQWAdaZq2lM5a7hQZFv0FIitrzKNft 6PFOuSxnZyBgPUxKaXGLY23nZlLiQ/2syYpBu0/3w8J6ZXFVCTQgfx5SXcbHVRdocuOc mhnV+ss2TtkyhsgSIW15AUw7waN/guqr8U2M0fGvrmzRp23DHybls7SUXnt/b8+gw3Uc VRmX08eBCaWPCEfygkQlDbBf491cQBGyPcaMH/36LjjKvy/uZO+8leL+f/H2SWTnDZjz 0/tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YhU4YfKq; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 6-20020a508746000000b00418c2b5bdb6si3279941edv.152.2022.03.18.03.38.05; Fri, 18 Mar 2022 03:38:30 -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=@intel.com header.s=Intel header.b=YhU4YfKq; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233416AbiCRIIJ (ORCPT + 99 others); Fri, 18 Mar 2022 04:08:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233358AbiCRIIA (ORCPT ); Fri, 18 Mar 2022 04:08:00 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64ED4231936; Fri, 18 Mar 2022 01:06:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647590802; x=1679126802; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=wwp1j4OGk9F57hN1np0w7mtBafinWSVg7Jz/pfT+Xe8=; b=YhU4YfKqYvXIgAEEkhPgWM5wofqzaVYYphzWESC+7gVLsQfZuDkGxxDl 1Y0iSNWt3f9fTVNrESbxcEZoIg/rlv/gw5Eg+utSyplA0KYMXxNNmAB68 LoYk1S0xsb/u/bpiEvphsLbQ67plogbLBkkfUpSi7WT70i04E1RHbDuQE Ld5IQwgIkjYdzF7kFgbms0Te+I+zCNHLWht2bNS1jXgFtjQj+D6v/pQTS UDNVUYe0ZulZIPNB0Z2+NTARYb8cPsFZeEu5041ydari1JAh2gJfog7nW qhxQgheRAOStDXZbnIbb5KdUbZcuRLYcCGAg6gswWVJ5qaTbaNRtRnSvH A==; X-IronPort-AV: E=McAfee;i="6200,9189,10289"; a="255917333" X-IronPort-AV: E=Sophos;i="5.90,191,1643702400"; d="scan'208";a="255917333" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2022 01:06:41 -0700 X-IronPort-AV: E=Sophos;i="5.90,191,1643702400"; d="scan'208";a="541734757" Received: from zq-optiplex-7090.bj.intel.com ([10.238.156.125]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2022 01:06:39 -0700 From: Zqiang To: paulmck@kernel.org, frederic@kernel.org Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/2] rcu: Deoffload rdp if rcuop/rcuog kthreads spawn failed Date: Fri, 18 Mar 2022 16:07:17 +0800 Message-Id: <20220318080719.1501471-1-qiang1.zhang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.9 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_NONE,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 When CONFIG_RCU_NOCB_CPU is enabled and 'rcu_nocbs' is set, the rcuop and rcuog kthreads is created. however the rcuop or rcuog kthreads creation may fail, if failed, deoffload the offloaded rdp. --- v1->v2: Invert the locking dependency order between rcu_state.barrier_mutex and hotplug lock. Holding nocb_gp_kthread_mutex, ensure that the nocb_gp_kthread exists. v2->v3: Adjust the position of the nocb_gp_kthread_mutex, in rdp_gp->nocb_gp_kthread check upper lock nocb_gp_kthread_mutex. Do the locking order change in a separate patch. Zqiang(2): rcu: Call rcu_nocb_rdp_deoffload() directly after rcuog/op kthreads spawn failed rcu: Invert the locking dependency order between rcu_state.barrier_mutex and hotplug lock kernel/rcu/tree_nocb.h | 83 ++++++++++++++++++++++++++++++++---------- 1 file changed, 63 insertions(+), 20 deletions(-) -- 2.25.1