Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp517465rdb; Wed, 17 Jan 2024 08:50:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYR+22OGomNMRr5qasObB1XOEb70pP2MQ/k1vKiqFpE5KLgnTCVK+/AyGQF/XE9NKPKTkQ X-Received: by 2002:a05:6a21:3295:b0:199:f2ef:8469 with SMTP id yt21-20020a056a21329500b00199f2ef8469mr10279875pzb.56.1705510211944; Wed, 17 Jan 2024 08:50:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705510211; cv=pass; d=google.com; s=arc-20160816; b=tR7QZnq/7tEsDDVi60xtJ42kUWM9waDkd9HN/6IDNc0SHKPHFBTVQFWrgOaHU+AiOf QZL5OtJXcZavIxm/0mgktUU3USe7JdGlCvou1aXgUeCaejkZqkBpRJllnLqhxguZr3o6 8IP4hfaVRTljEMYrd0OlHNUCjoZA2K8JiquhjN0DLJ/Cw7eYpPhBw8Dfq/dqQKJEl8fJ mPItaiVcGbB9AXdzOWE6KgC6OSEsegMSXhe4XuhGSjAS3GJufgAbfbX3uMmemf/o3HXY vURpEcDpEaSVjNiVc6I8b/Kotr6bHxFFFvD38H2asUmZPVTYZ50Q32OeEmybs3rqEAMY fD5Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=rjFWU3VSZDE3kD8BQKWbnkhbf707TtYyOuJ5RUq9a7I=; fh=0cYptx2rNTiuaWnhcL0TTYEVszmCn744IFt48f2CUlM=; b=gC9hHg3rYx1DljsKZA8hDsmNZ9gR5FnpQeFB6HV2LVIjydv2cfzMoU2/uLCA/7BN1o iCGuZLfHoEq9sB//sNyHEpmEzIYhHl2mZvZNuZu9w+bx5cMEWZ952UmTj7izraoi2Pfp /rOa3ACnXE6/G0K5ppIAQ7/GkdkaBgQVG+FmPuxX2kbgRspLfqROO59dqbOaV4UIIahZ CmHKOF3Jutc10b2aT0HDYzYhvU1G+96wZGBwJx9Z9NGIZGoSzw98sfMVW9HHW43/nIfM 1dancdOdhO8C7+yN/dETkpj6bgWonMdPAJCqv94qc7q9sYvCacctyQFtOdHNPCJhRp+l CE7g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dYd+rijC; 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-29226-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29226-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 36-20020a17090a09a700b002900ef893c3si401663pjo.109.2024.01.17.08.50.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 08:50:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29226-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=dYd+rijC; 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-29226-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29226-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 0CB1C28F70A for ; Wed, 17 Jan 2024 16:37:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 631AD23766; Wed, 17 Jan 2024 16:36:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dYd+rijC" 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 CCBB122627 for ; Wed, 17 Jan 2024 16:36:18 +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=1705509381; cv=none; b=g7tWV0A7WOlANcip8Egr+i9c6OMrVIeJet5fCtrGtSSTbaxFFbaGI8HW325SnfgyLLXJTCoWgOj1JD3psSejhuX2RDEsKIBq80FOKin7ByT7GxYOUgUCGXJ8hP/HzB2KG2iCcgSqJz4ZFP7lUXXqG8IN0Dpd8VVwzDu2QGXdevg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705509381; c=relaxed/simple; bh=zEdw6+4t3gWkhLRYybEMf2j+xLGxSJtwIdZKm2vmD5o=; h=DKIM-Signature:Received:X-MC-Unique:Received:Received:From:To:Cc: Subject:Date:Message-Id:MIME-Version:Content-Transfer-Encoding: X-Scanned-By; b=ogWnQ9xfffFM7wkDv8Lls374dcIj2nqK1P8phNjPRuSdtv6QufIWIczPDG1+9Ouy7Nb0nmIvloh+WnNYNbUqJ4W64Ylt7OXf9JlfOGfQxTFKI+cJE6RdgDhj1L91w2/bQvlaSKfX295emjWtwOHNVqFsac379gZ/qudZ/LYbido= 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=dYd+rijC; 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=1705509377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=rjFWU3VSZDE3kD8BQKWbnkhbf707TtYyOuJ5RUq9a7I=; b=dYd+rijCtLuhpHxqD2GM/s1eEji4x9ju/WUGUDIR4I1OySoLrqetavToRevo7Owzwv1cAr RcjzbUHVeroLbVjjkGYI1J6loG161bAaOgHRoA2NMGReP+bEoUa10/DMNgyOOLgFZYbxJC sFAMyVsW3aMZjDuGTy7F/V/d8Xvc/jY= 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-594-zLf2wzouOPWbYK-3U-_Ipw-1; Wed, 17 Jan 2024 11:36:06 -0500 X-MC-Unique: zLf2wzouOPWbYK-3U-_Ipw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (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 A874982A6CF; Wed, 17 Jan 2024 16:36:04 +0000 (UTC) Received: from llong.com (unknown [10.22.16.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4A0101121312; Wed, 17 Jan 2024 16:36:02 +0000 (UTC) From: Waiman Long To: Tejun Heo , Zefan Li , Johannes Weiner , Frederic Weisbecker , Jonathan Corbet , "Paul E. McKenney" , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Zqiang , Davidlohr Bueso , Shuah Khan Cc: 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 , Waiman Long Subject: [RFC PATCH 0/8] cgroup/cpuset: Support RCU_NOCB on isolated partitions Date: Wed, 17 Jan 2024 11:35:03 -0500 Message-Id: <20240117163511.88173-1-longman@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 This patch series is based on the RFC patch from Frederic [1]. Instead of offering RCU_NOCB as a separate option, it is now lumped into a root-only cpuset.cpus.isolation_full flag that will enable all the additional CPU isolation capabilities available for isolated partitions if set. RCU_NOCB is just the first one to this party. Additional dynamic CPU isolation capabilities will be added in the future. 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. On read, it also shows the CPU isolation capabilities that are currently enabled. RCU_NOCB requires that the rcu_nocbs option be present in the kernel boot command line. Without that, the rcu_nocb functionality cannot be enabled even if the isolation_full flag is set. So we allow users to check the isolation_full file to verify that if the desired CPU isolation capability is enabled or not. Only sanity checking has been done so far. More testing, especially on the RCU side, will be needed. [1] https://lore.kernel.org/lkml/20220525221055.1152307-1-frederic@kernel.org/ Frederic Weisbecker (2): rcu/nocb: Pass a cpumask instead of a single CPU to offload/deoffload rcu/nocb: Prepare to change nocb cpumask from CPU-hotplug protected cpuset caller Waiman Long (6): rcu/no_cb: Add rcu_nocb_enabled() to expose the rcu_nocb state cgroup/cpuset: Better tracking of addition/deletion of isolated CPUs cgroup/cpuset: Add cpuset.cpus.isolation_full cgroup/cpuset: Enable dynamic rcu_nocb mode on isolated CPUs cgroup/cpuset: Document the new cpuset.cpus.isolation_full control file cgroup/cpuset: Update test_cpuset_prs.sh to handle cpuset.cpus.isolation_full Documentation/admin-guide/cgroup-v2.rst | 24 ++ include/linux/rcupdate.h | 15 +- kernel/cgroup/cpuset.c | 237 ++++++++++++++---- kernel/rcu/rcutorture.c | 6 +- kernel/rcu/tree_nocb.h | 118 ++++++--- .../selftests/cgroup/test_cpuset_prs.sh | 23 +- 6 files changed, 337 insertions(+), 86 deletions(-) -- 2.39.3