Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp801458lqh; Thu, 28 Mar 2024 17:56:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWTf5ZEhUjYU/9tBnhn57pA03+HAG3fdT7WLVJpTD8lNKAZeppUppA+efSfRZ22FeE/0kcPHsG9lAx2TKWxvlAineHg0UL+bWHq2vtQqQ== X-Google-Smtp-Source: AGHT+IH90wB3G/9svdY3/k9UgEOrL18jAkusgGjti6RwuFYQ6G4Gjjug4WgQKNq+uZv3d09syzEh X-Received: by 2002:a05:620a:b8b:b0:78a:547c:ac1f with SMTP id k11-20020a05620a0b8b00b0078a547cac1fmr1054500qkh.10.1711673793989; Thu, 28 Mar 2024 17:56:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711673793; cv=pass; d=google.com; s=arc-20160816; b=DUQqg3AkLPD/c28F5UgXG8w9T5TWmj27ZusqHbIDecMK2yAC3cVnk38chjQdcYTS/Y 0w6zsKJZ6/05PmTxmezyJSs5+s5uEZ+PMyRyc0vqqXNgTu9BQIQtTQYBlfhHSZoxffC7 eOeSTts9dVaQQKni+IywGy77e2CubvLvmvKPQSQGs8SD32hQOcrW+NJXGCPb8Rjep3Vh TTRgAn/ucC9E1OZDzME/CSP2VFVQXz8ry+nm+reH6m2MPZeIrmsDQ0pvXEqrvBBNU5Oh ChX/CtTNkQG9mC7U+fTRL8pg2dm4QFKZ5xCgw+2JM0nvAZzOZMw+SaROEzPdkAKUEHcA EJvQ== 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=k3mzPsNX7W5NRZtTNJ51NaOr5melaIinfF0oNdCHQi4=; fh=HMT87RRYtaU+Jh+/BcQAQOYzJIA9wTKQ6fODNmLAlE4=; b=ZvPHh8UStDJoxtX+J3+NSChK6t/p1+VXZ+/0346ui9uMi2+9vqiuas+vuuh8PYBy8H L7WOD70Py/jznQy3zbQrg+PLaGDTKGX5bXx1l6qSdvOE3nb38W6N288J7/zLGdNFNEkp nad2OygGB4LH7LioTeEBPnr8/CqSCeA/K7no8NsUDkhVAiEElt82zpCI0WhIM+Mg8Sst /TszICtlsBBdBTNjENrTERqCnNCIjOd6oA/+ky0sugUtXi8BjSituIljYiePg/qsFU3Q wn1i3zd/GOivIgq7tuBMXF45vafGY+hJNm5Vg/BuBcTkFSaET4MYAcYgSYwpVW8TPLPP NWbQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ViZ2H7nK; 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-123931-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123931-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id n5-20020ae9c305000000b0078bc9099209si311296qkg.1.2024.03.28.17.56.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 17:56:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-123931-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ViZ2H7nK; 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-123931-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123931-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B33751C2580A for ; Fri, 29 Mar 2024 00:56:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A409F111AA; Fri, 29 Mar 2024 00:56:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ViZ2H7nK" 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 602AA28EF for ; Fri, 29 Mar 2024 00:56:25 +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=1711673786; cv=none; b=TPOCw+T66Ei2e4SwXZFjBDKnfF3dt2PkNrhMdrY3uYSRNLjyowY03ALylXKFfr/BMxhVbFktg6SnBNHAAe8XnmgXT4HeMLgBdAYR0EsnhpfNz4nBxif9b/EY4YYUgSrUydAf9GXYUBVZ30Uj2NeZjnRZ1HTwdsXl7q/xMtXPLOk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711673786; c=relaxed/simple; bh=bTxic3zTCVAnP1UInL2d0EPzinfN7xzR216WNJg4b6Q=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=gH3bwI0Urk01hRXB9GwK9vp368CkUDKqMe/XwQH1G+CMi+9F/OtSLLOqOOyDvoS7VXtzwFAUEiFYgwevzBt5CgQ2I7ZMGeuuAYSZUBFco/gsXPoKz/gjMdxBZf7tg/lsLivhMTlmUvlf2YL7IHNxwJ1Tac9SuIR3Je5K1hKOyn4= 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=ViZ2H7nK; 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=1711673784; 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=k3mzPsNX7W5NRZtTNJ51NaOr5melaIinfF0oNdCHQi4=; b=ViZ2H7nKd0QBvgUjX6dZ1Z+GlRdRHkDML/PYaYo3jzB1WnyU165InByzYbKFFEaD4VJ9aA Zb2sFHthDAdZyXWJ6BWfz3kf8+pZWZZZEHrokxt4cx2vfn/ZJWbjFEJx7e911UqJVEOTX/ qPxKRWFIr7QgctiQ4BnhN6pYvlV96aE= 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-6-9KCimqGQPxKhCir4LIknOQ-1; Thu, 28 Mar 2024 20:56:18 -0400 X-MC-Unique: 9KCimqGQPxKhCir4LIknOQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 E8F3A185A783; Fri, 29 Mar 2024 00:56:17 +0000 (UTC) Received: from [10.22.9.3] (unknown [10.22.9.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id 832511C060D0; Fri, 29 Mar 2024 00:56:15 +0000 (UTC) Message-ID: <3135adb7-9e4d-4538-ae1b-c67d37b1ee1b@redhat.com> Date: Thu, 28 Mar 2024 20:56:15 -0400 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: [PATCH 1/2] sched/isolation: Exclude dynamically isolated CPUs from housekeeping masks Content-Language: en-US To: Frederic Weisbecker Cc: Zefan Li , Tejun Heo , Johannes Weiner , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, Cestmir Kalina , Costa Shulyupin References: <20240229021414.508972-1-longman@redhat.com> <20240229021414.508972-2-longman@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.7 On 3/25/24 19:21, Frederic Weisbecker wrote: > Le Wed, Feb 28, 2024 at 09:14:13PM -0500, Waiman Long a écrit : >> The housekeeping CPU masks, set up by the "isolcpus" and "nohz_full" >> boot command line options, are used at boot time to exclude selected CPUs >> from running some kernel background processes to minimize disturbance >> to latency sensitive userspace applications. Some of housekeeping CPU >> masks are also checked at run time to avoid using those isolated CPUs. >> >> The cpuset subsystem is now able to dynamically create a set of isolated >> CPUs to be used in isolated cpuset partitions. The long term goal is >> to make the degree of isolation as close as possible to what can be >> done statically using those boot command line options. >> >> This patch is a step in that direction by making the housekeeping CPU >> mask APIs exclude the dynamically isolated CPUs when they are called >> at run time. The housekeeping CPU masks will fall back to the bootup >> default when all the dynamically isolated CPUs are released. >> >> A new housekeeping_exlude_isolcpus() function is added which is to be >> called by the cpuset subsystem to provide a list of isolated CPUs to >> be excluded. > Can we instead overwrite housekeeping_boot.cpumasks from cpusets entirely and > forget about the original boot value forever? That is an interesting question. I think we will still need to keep the boot values somewhere, at least until we can dynamically isolate CPUs as good as what can be done at boot time. At this point, what can be done dynamically is still limited. So we want to keep the statically isolated CPUs around without breaking its isolation. Of course, we can do all these within cpuset with minimal change in kernel/sched/isolation.c. Cheers, Longman