Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4990846rdb; Tue, 12 Dec 2023 15:57:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IEKlr4/4RRulDyZhoUL5ruq+v6Cq1eq7KjrjRiZ/3ffXBK0PoCsS8gWYGzSMUEPphfQb9nP X-Received: by 2002:a05:6a20:12c9:b0:190:1d2b:cb67 with SMTP id v9-20020a056a2012c900b001901d2bcb67mr8109546pzg.32.1702425445491; Tue, 12 Dec 2023 15:57:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702425445; cv=none; d=google.com; s=arc-20160816; b=UR7AJb/7Ma3QE/YWXDmCou/foHtnTUs5wCyEO+ovGYXMxaMnFuNwEphX6jE8owvIn3 zgFPHW8aFkFxR06P/FHNaK0xRUJvuj4UL1wlFP0kQ/PGtbg4rMsfRRWjmPk0wtrma4he KHHwJImSoECQDdfXdePz16t1ypMFx7Y6utCcCa6pCcqUG4TUTOASRmw7LJf/4lXGap/n QdK3/GKYEuRuvevOdCCT7+4uqfdElFyMMM5cAv+2KBkBuWUwNSKrB/DW0uBCaGJzOxTk BvJ+IKr4UGSGdSgvPKNNRDCIHzv6zb4iSAKX/qYZQqA5LoJJDxuTPgSNz/nOKldXMLf/ oWpw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=15iIgfaSHeLsO8JyeL4gKo1AZV1WxT6ysxhAp74+twQ=; fh=herYGeEGG+1ITbU8zk9KYcnJ31tmpS5Yd2fiSPA3xJU=; b=M6xPXKxIZ40p58qzU/aoWSBDplsUoI4Em9HpgfE91/69K7I7JxSNg7tyHvCv0MHaOI U33CWMdIc//v2lim6RDAMLdVXuyUC6qdl5VsGCuHHQLpOoaDaeycJeWstsD4FGvBTA9G xQFT+o/UB39vdfLbjoO8DWLiZKz8FCK/AtEUaJsdZZo6I9Kt+JnVfg5D4wiC3jldAfFK Li59hhpxg3sOhrd/ctPC067IsFAgpveljgp34I1mbTWvX/iYpL9f8c/nAbKNAB6v+V4S kNHPt71ybbA9dwUkJ1KkfDDGL73kK7hzf+2zOIYDELIGx3w/7ZNJPfu6bnz9wxC2nGIr 8XMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Er3wa+iH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id t14-20020a63eb0e000000b0056959099f46si8289509pgh.856.2023.12.12.15.57.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 15:57:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Er3wa+iH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 9A682809AF91; Tue, 12 Dec 2023 15:57:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377467AbjLLX5G (ORCPT + 99 others); Tue, 12 Dec 2023 18:57:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232512AbjLLX5F (ORCPT ); Tue, 12 Dec 2023 18:57:05 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A18E9B2 for ; Tue, 12 Dec 2023 15:57:11 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD86CC433C8; Tue, 12 Dec 2023 23:57:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702425431; bh=SuBNtpwXRuXuAk6i9Jjme9Aya8cKB5MGJ2ffLAtpOxM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Er3wa+iHzVEwSzheJJ0GWEsxVVCY5FDU9fGqxa7NDhmT0aXDvOoyLQXv3BJgIygat kugiBHCoH9XgFewNSExe9tfQlKXecjZKGyGkZz+0pc6ENp+Jz0W21/T4PRP0Tg0NGR ceAuEbvd9nuVXqGmsMbL5I3VZ4hl7Q95flxPn6JhimdWS6SSRpWhKLzVtzGWmjEU2c 7BvMlI3c2PP//XsG6VaLTUbcOGTBsR51teFvlLR1gT/sOTyGCxbdxsGLsBW5FeNffy VG4aq1DCFVodv0f/ovFHrRBBUyi2d3rqgr+3mGChb2/kdWdi5KrkBb+eCkieh7VphP Bjy8QUPf6PFLg== Date: Wed, 13 Dec 2023 00:57:08 +0100 From: Frederic Weisbecker To: Waiman Long Cc: Gianfranco Dutka , Tejun Heo , Vincent Guittot , linux-kernel@vger.kernel.org, vincent.guittot@linaro.com, Ingo Molnar , Peter Zijlstra , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , "Pandruvada, Srinivas" , Phil Auld , Cestmir Kalina Subject: Re: Modifying isolcpus, nohz_full, and rcu_nocb kernel parameters at runtime Message-ID: References: <76587DD3-2A77-41A3-9807-6AEE4398EBA6@arista.com> <25E6E1E4-DC16-490E-B907-A3236FB9317A@arista.com> <7e3bf653-d3ea-48b0-b808-d92a3c5f2c5b@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7e3bf653-d3ea-48b0-b808-d92a3c5f2c5b@redhat.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 12 Dec 2023 15:57:22 -0800 (PST) On Tue, Dec 12, 2023 at 03:18:43PM -0500, Waiman Long wrote: > > On 12/12/23 08:27, Frederic Weisbecker wrote: > > On Fri, Dec 08, 2023 at 09:18:53AM -0500, Gianfranco Dutka wrote: > > > > The isolcpus, nohz_full and rcu_nocbs are boot-time kernel parameters. I am in the process of improving dynamic CPU isolation at runtime. Right now, we are able to do isolcpus=domain with the isolated cpuset partition functionality. Other aspects of CPU isolation are being looked at with the goal of reducing the gap of what one can do at boot time versus what can be done at run time. It will certain take time to reach that goal. > > > > > > > > Cheers, > > > > Longman > > > > > > > Thank you Waiman for the response. It would seem that getting similar > > > functionality through cgroups/cpusets is the only option at the moment. Is it > > > completely out of the question to possibly patch the kernel to modify these > > > parameters at runtime? Or would that entail a significant change that might > > > not be so trivial to accomplish? For instance, the solution wouldn’t be as > > > simple as patching the kernel to make these writeable and then calling the > > > same functions which run at boot-time when these parameters are originally > > > written? > > As for nohz_full (which implies rcu_nocb), it's certainly possible to make it > > tunable at runtime via cpusets. If people really want it, I'm willing to help. > > As said by Phil, your help in in enabling dynamic rcu_nocb will be greatly > appreciated. rcu_nocb is already ready for that. The not yet ready part is nohz_full and its several components (tick, remote tick, [hr-]timers affinity, workqueues affinity, kthreads affinity, vmstat, buffer head, etc...). Last debate on plumbers suggested that nohz_full should be dynamically turned on/off only on offline CPUs. That will indeed simplify the problem. > My current thought is to have a root level > cpuset.cpus.isolation_control file to enable additional CPU isolation like > rcu_nocb to be applied to CPUs in isolated partitions. Last time I tried that, Peter Zijlstra was more in favour of an isolate all or nothing switch by default for nohz_full that would include rcu_nocb. And then if people are interested in something more finegrained, introduce such a file to control individual features (see https://lore.kernel.org/lkml/YpIwsiaY2IPK96WO@hirez.programming.kicks-ass.net/ ) But so far I never heard about the need for such a finegrained isolation. Users of nohz_full= seem to want to isolate everything out. Thanks.