Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp353636rdh; Wed, 7 Feb 2024 06:48:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IHhhRR2iCzP7BArCsMVlF1PEiDQzHor6+F91ZqlsEiGAT7pN4rEwEF/N0inkRY+0sh3tkFx X-Received: by 2002:a17:902:f681:b0:1d9:a2d3:8127 with SMTP id l1-20020a170902f68100b001d9a2d38127mr5862071plg.52.1707317289257; Wed, 07 Feb 2024 06:48:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707317289; cv=pass; d=google.com; s=arc-20160816; b=BYIWfRcY5JXjc3v6t2xtJgS9QM2G9/dzg9UOtLt0x8jGu21xm6CBTzRN9u97StIMUv FX6nDxt0tbFEX7xf9c8BEz0emR+P1eHLFkPwpjgAbj/LMT1Le6yunaGy7y9BbpmXmx5b JZ+moRrVgjSyVxqyIvc/al0WBTgodb3X2EhlFuX+aEgsm8EWCghwYgWwi7vD+N8ixPsv Oys0aLT5dx786VKWAmQBmZXi8UXt8UlV5dOE5Jb7WQ3CuQAn1NcYyout0JhrbesvQt6u Y7GFo91LhX79rYO4uHiAs6RikwlZvPayFuzZKOtTcvBy4/SFXfXAs7EJcoONoUKWIYqq 25dw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=A6fydK9Rk9ghuvYarsAtIBey9ChNS2PmRkreCrx7vgM=; fh=5hMRY1u0o4kWaHoni6wiVSH+0Kqbu1BfY46dCht0ayE=; b=M2CqRJ1ACfOHuZBOJc8u9lcWnyRlwO5VlgsTfOtX+EL2pb0JR5xY6tVx2FPG3ARsbL DQKhfz9V/xp1UCvLclUxWVXUtKopBWLWUDHY2Mm8CTkaTCfz3BQu0qU3wlpHQcwOzkqW bCDlXmLNYAz0daGY1YtQ3R8wnXDIO886ki6/XpniGS3aqnBX8mRns2U1cBovGcNP74CW lRxT3wZ5IFYwWr9SRyn5rkIr0UeNbykup/FmlotJF1jXdnWr9xb6v+vZoUPMuGQDz4ZE 59FEpuImC86rVaTT+/YlA8daCobSVhjC4dU6fNYmGBbQmYgXLIYYWb4P+wMH0ttW3HDb Nexw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=icYajaCA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-56647-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56647-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCXCLSqeMojJAF9xIBeGs04J4GiavSM1EP2pb9trRFkTO6GGw8jRh4gq7dk8q/C+qVm/I4+h3s+LlM4zhhd66kZleB2u2ZW7b7XM5bLnbQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l15-20020a170903244f00b001d71ef3bef8si1866346pls.343.2024.02.07.06.48.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 06:48:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56647-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=icYajaCA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-56647-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56647-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E3066289231 for ; Wed, 7 Feb 2024 14:48:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B28147E58E; Wed, 7 Feb 2024 14:47:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="icYajaCA" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2C127D3E6; Wed, 7 Feb 2024 14:47:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707317269; cv=none; b=t/AfrvzZKvEJfMvQ0/MXJLmniPCW0FUVaTQbLtFq1SPiwdPoV6FGdMX+FKiKKTJKWryV8X8VIvXqYKv5OCpufvwziFz4o5FwpPlohjp2uH9HKcqUvnpvZ8M9q2whbqJiZy09a0N+VdbkQrzaGGVYsP50ed7zDVTvOsxIDPM2kzQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707317269; c=relaxed/simple; bh=dqeS7RKaqg5NSBHC9tqAZ0jlOtvjCCV80N050qidhz4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HzRYVwZOikh7PXvTpnuv/06Xu2fFITQA/EscgbNhWI5kfxylcErZiV/1PxlIryufU3rJnoZvIAr4aIQmDhl6b/8pnBpQ2Z2cFm4wPcMxSxIvyU36uZIu6wu/4mG4wKQDKvVQMT+A4rIm0lvfKnBhZYek5fsNYsl7TkK7K6SNJmc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=icYajaCA; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B241DC433C7; Wed, 7 Feb 2024 14:47:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707317269; bh=dqeS7RKaqg5NSBHC9tqAZ0jlOtvjCCV80N050qidhz4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=icYajaCA2tFuTuC9D1SNlZkAipRaQApzHfHrIPO4rCmYFsJxTQhhfFshiqBzaCWju y12CJHYXvQttTjw5qpXSAtyLcfMStuhpTAyRQEhLzToFX0NrTqDP81kOhE2wMFrQpM HQB9k4CEAY9lkMSxxC4tQYBwQ1ilFaMSUNmfR1zqzAlallx3LLJP2zBl/kNfc8/tvz 7y6rbmy/s3mgvrPkcOT9x/RJ0buI/rNL47I4cQaFBkfRU1n/g7tiArc81Jx7KqxO5w ySeNZCGRyg6jIOTOdyZoouhyyFlMC3z9ynle0GLAdzOCw7gKdklno1RqDO4QEusQcT XVhPLhZv65j0w== Date: Wed, 7 Feb 2024 15:47:46 +0100 From: Frederic Weisbecker To: Marcelo Tosatti Cc: Waiman Long , Tejun Heo , Zefan Li , Johannes Weiner , Jonathan Corbet , "Paul E. McKenney" , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Zqiang , Davidlohr Bueso , Shuah Khan , cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, rcu@vger.kernel.org, linux-kselftest@vger.kernel.org, Mrunal Patel , Ryan Phillips , Brent Rowsell , Peter Hunt , Cestmir Kalina , Nicolas Saenz Julienne , Alex Gladkov , Phil Auld , Paul Gortmaker , Daniel Bristot de Oliveira , Juri Lelli , Peter Zijlstra , Costa Shulyupin Subject: Re: [RFC PATCH 0/8] cgroup/cpuset: Support RCU_NOCB on isolated partitions Message-ID: References: <20240117163511.88173-1-longman@redhat.com> <5ee5bf79-6cdc-4d1b-a19f-f0d5165a5f16@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Le Tue, Feb 06, 2024 at 04:15:18PM -0300, Marcelo Tosatti a ?crit : > On Tue, Feb 06, 2024 at 01:56:23PM +0100, Frederic Weisbecker wrote: > > Le Wed, Jan 17, 2024 at 12:15:07PM -0500, Waiman Long a ?crit : > > > > > > On 1/17/24 12:07, Tejun Heo wrote: > > > > Hello, > > > > > > > > On Wed, Jan 17, 2024 at 11:35:03AM -0500, Waiman Long wrote: > > > > > The first 2 patches are adopted from Federic with minor twists to fix > > > > > merge conflicts and compilation issue. The rests are for implementing > > > > > the new cpuset.cpus.isolation_full interface which is essentially a flag > > > > > to globally enable or disable full CPU isolation on isolated partitions. > > > > I think the interface is a bit premature. The cpuset partition feature is > > > > already pretty restrictive and makes it really clear that it's to isolate > > > > the CPUs. I think it'd be better to just enable all the isolation features > > > > by default. If there are valid use cases which can't be served without > > > > disabling some isolation features, we can worry about adding the interface > > > > at that point. > > > > > > My current thought is to make isolated partitions act like isolcpus=domain, > > > additional CPU isolation capabilities are optional and can be turned on > > > using isolation_full. However, I am fine with making all these turned on by > > > default if it is the consensus. > > > > Right it was the consensus last time I tried. Along with the fact that mutating > > this isolation_full set has to be done on offline CPUs to simplify the whole > > picture. > > > > So lemme try to summarize what needs to be done: > > > > 1) An all-isolation feature file (that is, all the HK_TYPE_* things) on/off for > > now. And if it ever proves needed, provide a way later for more finegrained > > tuning. > > > > 2) This file must only apply to offline CPUs because it avoids migrations and > > stuff. > > > > 3) I need to make RCU NOCB tunable only on offline CPUs, which isn't that much > > changes. > > > > 4) HK_TYPE_TIMER: > > * Wrt. timers in general, not much needs to be done, the CPUs are > > offline. But: > > * arch/x86/kvm/x86.c does something weird > > * drivers/char/random.c might need some care > > * watchdog needs to be (de-)activated > > > > 5) HK_TYPE_DOMAIN: > > * This one I fear is not mutable, this is isolcpus... > > Except for HK_TYPE_DOMAIN, i have never seen anyone use any of this > flags. HK_TYPE_DOMAIN is used by isolcpus=domain,.... HK_TYPE_MANAGED_IRQ is used by isolcpus=managed_irq,... All the others (except HK_TYPE_SCHED) are used by nohz_full= Thanks. > > > > > 6) HK_TYPE_MANAGED_IRQ: > > * I prefer not to think about it :-) > > > > 7) HK_TYPE_TICK: > > * Maybe some tiny ticks internals to revisit, I'll check that. > > * There is a remote tick to take into consideration, but again the > > CPUs are offline so it shouldn't be too complicated. > > > > 8) HK_TYPE_WQ: > > * Fortunately we already have all the mutable interface in place. > > But we must make it live nicely with the sysfs workqueue affinity > > files. > > > > 9) HK_FLAG_SCHED: > > * Oops, this one is ignored by nohz_full/isolcpus, isn't it? > > Should be removed? > > > > 10) HK_TYPE_RCU: > > * That's point 3) and also some kthreads to affine, which leads us > > to the following in HK_TYPE_KTHREAD: > > > > 11) HK_FLAG_KTHREAD: > > * I'm guessing it's fine as long as isolation_full is also an > > isolated partition. Then unbound kthreads shouldn't run there. > > > > 12) HK_TYPE_MISC: > > * Should be fine as ILB isn't running on offline CPUs. > > > > Thanks. > > > > >