Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1342885rdb; Fri, 9 Feb 2024 20:22:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IElG5cvrSzKsi2ZE+fRWhBxCtXaYjyI+yUmpTOCE8+TbfwQaBdKMxvCgA4Z7fX4sjvAS4Pf X-Received: by 2002:a05:6a21:6315:b0:19c:8a1a:d9a8 with SMTP id wu21-20020a056a21631500b0019c8a1ad9a8mr980529pzb.42.1707538934846; Fri, 09 Feb 2024 20:22:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707538934; cv=pass; d=google.com; s=arc-20160816; b=KQ7HzYhqV9h6MHU4XmQHZsnq3nwYVTEZp/XrvSQMjbpVkyEVufuNAYQ8q0UfxPz9cW ffDQ/O9Kq7h3lFkCN8U2zchGFekxN1kU/Ko/jD3Zj2h/Zu0fADGTtydNmxz0ENn1xYXm OQUDrZ7tgJgB49rSxwyUZlzex75ljtiaMj/gDLN/nWiHHr9tFfqt09HhhgkfQg5XZTVF WPp8yBuVRwMAEk4R5hJ5MjSrnXT91iy+Vnj3595AX1r4KdDFT3mIPglLoXAySgRZMACA enjnMo7KpC3E+KqD6uiBrHX2F8xMOwLp3XpgjKQLWfRNEl7yE/tEv+zpo4Nso/K9MZ37 DOJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Qj8awdQxCDQMdFFZH7GYC8xsn8ZodHraAX8/7iY9PS8=; fh=oP1zHgJIWnUbuoLyt+oGy9yiCIQgvhe4Cgw+Fh/8ExI=; b=WYy8AlpfAGkFi8GQtPGSzieloL0DJmU9mmbcWjzTERdxJZ2VbxkN6e7i9qA4a0ID3D K5s3+HXGw4NNIe3X3Wh2TP2crcrwgiapizJhZlVVgKAdpTxiy0Yp6xZvNM1WDqJuas3g EnG6AqQElB4SzvVO8MteNrObWPaTXXZdAeCClXhSGZa+iGHVbSj/i48EEciHG9HVXcO0 j3dZoYm4E9KBQd8sVXFHU4eMgyuUVx6skMIyszlRc62JZyEapNhJw9ykSPATWrEiPGCe YPNfKFLdk7pg7AIxrQyMYTjEmrnm8SXO0c4PXYrywlyXJEho0VYXJ2Uy/SKau/3S9hSv n4NQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Grv1KxsD; 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-60277-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60277-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; AJvYcCX+ePgxyMLCBQQuN2+KKO9plzY3t0OMibFHyjiTuXLhqYlzUikIuFurKz5zM1gc9+B5XxUt6wmzr4qK6sCOq7g8O2lueImm2324nIS3uQ== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id j12-20020a170903024c00b001d45e257fb7si2854759plh.243.2024.02.09.20.22.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 20:22:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60277-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Grv1KxsD; 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-60277-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60277-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 2DB49B24D62 for ; Sat, 10 Feb 2024 04:20:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4B03C6AB7; Sat, 10 Feb 2024 04:20:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Grv1KxsD" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 C7B125684 for ; Sat, 10 Feb 2024 04:20:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707538810; cv=none; b=QfkVEIfFW6SwgTGTjvgjuyYA/m6CRr0lwp4wf/MRcXV87oPsgS4p009KfWiv6wcBBog/toAOwNl1W057QfPxERRW1D66FoVhWhQAdWXjbRSlOYNzTywjkwOkCbsqzW6K2mWkAi1HIi+H1AUSIHj0jsiKHnoqfCAD1GAQLhkw+YY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707538810; c=relaxed/simple; bh=MI1UER5k/zVC0RgJ6mRH32EW0jN5U9Mp1biZX1Oxpww=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=n1KhwF7vmbkdXTt/bB5DRZLhmHO2RIs0HptoSqMp+UIFUqKZfbzbtUDjDZ9bAYPy7bYALtvBhqtxAXaZmBFwcFXaGhmWEh9Oc0LJXNcFyhahQVWIC6wDPXqcxB2CA4WEJ0B5v0xw/znJp9ZTzDasO5e84CR7gCCCLx1fW8cG5lU= 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=Grv1KxsD; arc=none smtp.client-ip=170.10.129.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=1707538807; 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=Qj8awdQxCDQMdFFZH7GYC8xsn8ZodHraAX8/7iY9PS8=; b=Grv1KxsDQaskCRYcKWRLBkes3Ecje/g/VhuQe23bRd179VRHad3kN0Prk3qPqq5or/irSz L3OyB/esyiAXdpjSXEayk63lFdW6/XdH6UhgQfpAUFe+mrpVKX+mrq4q7ZDTupFsO0cnKz 71UNeuEmC3SjSYU15qrzCBMxPAWWHFc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-589-1Up1vlD4PW-fA4xNBnYDpQ-1; Fri, 09 Feb 2024 23:20:02 -0500 X-MC-Unique: 1Up1vlD4PW-fA4xNBnYDpQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 2213E185A780; Sat, 10 Feb 2024 04:20:01 +0000 (UTC) Received: from [10.22.17.112] (unknown [10.22.17.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9B6762166B31; Sat, 10 Feb 2024 04:19:58 +0000 (UTC) Message-ID: Date: Fri, 9 Feb 2024 23:19:58 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 0/8] cgroup/cpuset: Support RCU_NOCB on isolated partitions Content-Language: en-US To: Frederic Weisbecker Cc: 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 , Marcelo Tosatti , Phil Auld , Paul Gortmaker , Daniel Bristot de Oliveira , Juri Lelli , Peter Zijlstra , Costa Shulyupin References: <20240117163511.88173-1-longman@redhat.com> <5ee5bf79-6cdc-4d1b-a19f-f0d5165a5f16@redhat.com> From: Waiman Long In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 On 2/6/24 07:56, 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. That is more or less the current plan. As detailed below, HK_TYPE_DOMAIN & HK_TYPE_WQ isolation are included in the isolated partitions by default. I am also thinking about including other relatively cheap isolation flags by default. The expensive ones will have to be enabled via isolation_full. > > 2) This file must only apply to offline CPUs because it avoids migrations and > stuff. Well, the process of first moving the CPUs offline first is rather expensive. I won't mind doing some partial offlining based on the existing set of teardown and bringup callbacks, but I would try to avoid fully offlining the CPUs first. > > 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... HK_TYPE_DOMAIN is already available via the current cpuset isolated partition functionality. What I am currently doing is to extend that to other HK_TYPE* flags. > > 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. HK_TYPE_WQ is basically done and it is going to work properly with the workqueue affinity sysfs files. From the workqueue of view, HK_TYPE_WQ is currently treated the same as HK_TYPE_DOMAIN. > > 9) HK_FLAG_SCHED: > * Oops, this one is ignored by nohz_full/isolcpus, isn't it? > Should be removed? I don't think HK_FLAG_SCHED is being used at all. So I believe we should remove it to avoid confusion. > > 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. Yes, isolation_full applies only to isolated partitions. It extends the amount of CPU isolation by enabling all the other CPU available isolation flags. Cheers, Longman