Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1029258rdb; Fri, 9 Feb 2024 08:14:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IFRfxaRfXCEolawr+6alXeh4Hq7XiFM5lUqIGVjSTcNIfTodlyhRK4BY40anERymGg3xmGB X-Received: by 2002:a17:902:6b44:b0:1d9:b8bc:fd7 with SMTP id g4-20020a1709026b4400b001d9b8bc0fd7mr1895549plt.68.1707495254648; Fri, 09 Feb 2024 08:14:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707495254; cv=pass; d=google.com; s=arc-20160816; b=eAtKgSjXK+3R39sgASoWfa+Ocq+FhXtS4wZ5r3v+THDEwTQynuBpy9WGk8BzbMEYsL 3AO5/KJtR8vagrFVbMi/WVS23RTXMBraYSVODZvl0o1JsZhExGqKAayTPXwHUw/U//OU mT0aRVl7MFqZTbwti15nOp0222ss1oYO8e3WVD0o/U/bIuMD5bQ8fpeJI2ff/ev3Y0gj Twwe0toWYIC/R5I1W0JsIRpU13JxAxAcmHJlROhI+tn/YupubcjCSTZtAJDn75/KCQ1k vy9/TvDw6tBzjSlPEqfQj+/JG2O1hAOKNUWBo95HgFp3LQTvaqCGLZO7dS6RdDHpTXfq LDvw== 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=0KdzfFxuaAxTQegBPNRDPqdrZtFIwl4Nb3u77kWuWvE=; fh=P+jmsgvjViOwvZmraEBcOQRgMLmIBJPX23eh7XXkyIE=; b=KKogcGij2GxcWWG9E6JmW7ctLPrfv/JIGjB+TTISST52VCAwKWV1s54yuoDgonG23d YIQDWKELiPPsyJnifiPnkBRs7VDRUltgReHaI/vWqTQhwxnPHoABE8eNznHCk9EzNBmi X3orIMhFABsXyF6R3AvzM6JHNN+NhVgYSbLgzoyQb5QkSMgf+d/lr2uFQqrhFebI06Tq U0MUHOIcro3fMkpItTvPBsfwQIY6MR2IFJovMKhcd/TPXvaNdqXaI+kslHPuayhDZI7w OpGGVB9+ez/j1kMUcjlE/axFq6wSNkd5P41/adYbif/69Uuf44b2tKdep7DBHC5Ej6pt tAOg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UVhP4BDn; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-59586-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59586-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=2; AJvYcCXPcGpcAcAptTI+9bWUbrbw8Ow5+6qsE7M43nqtxD6DMI5ceYZEJDzvoT/ODrXzpxJldLbaOOLmlPIi2Y7y9BNDHuBkYUf7ERn3zfhLJQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id lk8-20020a17090308c800b001d9639a4320si1963533plb.371.2024.02.09.08.14.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 08:14:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59586-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UVhP4BDn; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-59586-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59586-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 BBDA42869AC for ; Fri, 9 Feb 2024 16:09:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0815B7BAF3; Fri, 9 Feb 2024 16:09:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="UVhP4BDn" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 69A1C7B3F3 for ; Fri, 9 Feb 2024 16:09:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707494956; cv=none; b=m6bGgjev6e9iJJcrR/zRhpamcgP1CPdBm6IBvehQTEmkv840qvUttBmsA4CHTRVcwsPcC7jcYsYopq0jt/kCljjY2c3+dPbs8fcm4RigiIIVKkYV7JxdX12yeQo2I8PQxk1//Pwot75FKLi3webI/WbvPESB7Ru6lRjT3I05V6Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707494956; c=relaxed/simple; bh=q6wyummIqcmZDUbzboQvNIEztcMivzauItQGnEHzm+k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NzwoHLWdPWm9IiF7VTxmLVO8MMVEZihnfVznAlNmQfD7/usvS+rhJLvVsw8wjGf+XArPe0k3chAMvRY7+DtAk3oQgo2LrjP8yKkTPnah8P/NdNvnmPWifOs7UPEfWoW9LP7B23I4Kr7cc85DQ6u1UPAK1eldSHEY6kvp3wGZVmU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=UVhP4BDn; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707494953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0KdzfFxuaAxTQegBPNRDPqdrZtFIwl4Nb3u77kWuWvE=; b=UVhP4BDnr4TT3xxFiZIz5/YxuZZf5Tz9rPbinnpcRH2GiWX/krO9wdpO2s2LcoXe5Q2sVt gXsVA6pvVDkRCVws/IMjGAK8Uvhc5aeHtnTLnBD6VGJterMRaKDc6larDMjW3NoTfVbk0V gusCk7sWNf2ZnEMNrIxlPY90rgSN4jk= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-494-58nEO-BdNnKrOcjPFr-AOQ-1; Fri, 09 Feb 2024 11:09:06 -0500 X-MC-Unique: 58nEO-BdNnKrOcjPFr-AOQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8651D38116E7; Fri, 9 Feb 2024 16:09:04 +0000 (UTC) Received: from tpad.localdomain (unknown [10.96.133.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6D61840C9444; Fri, 9 Feb 2024 16:09:03 +0000 (UTC) Received: by tpad.localdomain (Postfix, from userid 1000) id 81307400E52ED; Wed, 7 Feb 2024 11:59:21 -0300 (-03) Date: Wed, 7 Feb 2024 11:59:21 -0300 From: Marcelo Tosatti To: Frederic Weisbecker 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: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 On Wed, Feb 07, 2024 at 03:47:46PM +0100, Frederic Weisbecker wrote: > 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= I mean i've never seen any use of the individual flags being set. You either want full isolation (nohz_full and all the flags together, except for HK_TYPE_DOMAIN which is sometimes enabled/disabled), or not. So why not group them all together ? Do you know of any separate uses of these flags (except for HK_TYPE_DOMAIN). > 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. > > > > > > > > > >