From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0625C11F66 for ; Wed, 14 Jul 2021 16:54:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 83B3861154 for ; Wed, 14 Jul 2021 16:54:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229699AbhGNQ5R (ORCPT ); Wed, 14 Jul 2021 12:57:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229591AbhGNQ5Q (ORCPT ); Wed, 14 Jul 2021 12:57:16 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64187C06175F; Wed, 14 Jul 2021 09:54:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Q0twLm1z1R0272a0gO8MDKn0VGtCaKOLX5zeaoDfy7Y=; b=fyvXzPlxhF3nWWnznUlnq4Dikm hX2wJaaNocJtshQ0ww0fN1B4flWR1WAf9fv6REtMnCM11+TFwu72WK17oDrcLSDc9pOww0UZFQvGq nk5K1LrOAyuAEF880y7lGv2O5lk6CYX5cz+rNEM4jAooUOPr0uzxpRDDd6VqmrTpu9OvzsM/Y0NpJ vpK9G3MPxB49hQERwFqvHF2RBPArImxE4GZooADG7gXFSiBMWUIxP5xPDGYW8YLQyG9shv3Gfex64 9L7P98EIfUwgbPdWp075MRNcR5MBJFoGs28h/co7WlWPYfzKj3mMTFhyn1QWxCuwG5uZy9PqS/fpP Qq3IMuyQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3i7r-002OGM-KU; Wed, 14 Jul 2021 16:53:11 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (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) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 29748300056; Wed, 14 Jul 2021 18:52:45 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 6195020141192; Wed, 14 Jul 2021 18:52:44 +0200 (CEST) Date: Wed, 14 Jul 2021 18:52:43 +0200 From: Peter Zijlstra To: Frederic Weisbecker Cc: LKML , Tejun Heo , Juri Lelli , Alex Belits , Nitesh Lal , Thomas Gleixner , Nicolas Saenz , Christoph Lameter , Marcelo Tosatti , Zefan Li , cgroups@vger.kernel.org Subject: Re: [RFC PATCH 6/6] cpuset: Add cpuset.isolation_mask file Message-ID: References: <20210714135420.69624-1-frederic@kernel.org> <20210714135420.69624-7-frederic@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210714135420.69624-7-frederic@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 14, 2021 at 03:54:20PM +0200, Frederic Weisbecker wrote: > Add a new cpuset.isolation_mask file in order to be able to modify the > housekeeping cpumask for each individual isolation feature on runtime. > In the future this will include nohz_full, unbound timers, > unbound workqueues, unbound kthreads, managed irqs, etc... > > Start with supporting domain exclusion and CPUs passed through > "isolcpus=". > > The cpuset.isolation_mask defaults to 0. Setting it to 1 will exclude > the given cpuset from the domains (they will be attached to NULL domain). > As long as a CPU is part of any cpuset with cpuset.isolation_mask set to > 1, it will remain isolated even if it overlaps with another cpuset that > has cpuset.isolation_mask set to 0. The same applies to parent and > subdirectories. > > If a cpuset is a subset of "isolcpus=", it automatically maps it and > cpuset.isolation_mask will be set to 1. This subset is then cleared from > the initial "isolcpus=" mask. The user is then free to override > cpuset.isolation_mask to 0 in order to revert the effect of "isolcpus=". > > Here is an example of use where the CPU 7 has been isolated on boot and > get re-attached to domains later from cpuset: > > $ cat /proc/cmdline > isolcpus=7 > $ cd /sys/fs/cgroup/cpuset > $ mkdir cpu7 > $ cd cpu7 > $ cat cpuset.cpus > 0-7 > $ cat cpuset.isolation_mask > 0 > $ ls /sys/kernel/debug/domains/cpu7 # empty because isolcpus=7 > $ echo 7 > cpuset.cpus > $ cat cpuset.isolation_mask # isolcpus subset automatically mapped > 1 > $ echo 0 > cpuset.isolation_mask > $ ls /sys/kernel/debug/domains/cpu7/ > domain0 domain1 > cpusets already has means to create paritions; why are you creating something else?