Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp323517lqo; Thu, 16 May 2024 07:23:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXErnLY0AAGrZdPBMcZ5ZTfvuLrMrw+uKx3gHJw8FFA1vEgxdTjXWLZX+ZhLEPi8ys1bGyanF1x+yV3cObSq9XBHPX10gDjdcnJdq5w0w== X-Google-Smtp-Source: AGHT+IHU+jidzXf5QpiLLca/eWunHOhb8C2lWFKgNAbyxsjgP5mAokTVVCPrxi5xTSiCVxCdzO1f X-Received: by 2002:a17:906:7f99:b0:a55:b272:ea02 with SMTP id a640c23a62f3a-a5a2d67b044mr1286717066b.75.1715869421502; Thu, 16 May 2024 07:23:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715869421; cv=pass; d=google.com; s=arc-20160816; b=xAzhJqFhQN2KVjs/4iUrFtrOf+ABNaxMueEb3mP/x//aunZM+lrGg0j+OB7VASjufK 1IIta66QwG6b0Gk+s5O0/LdVreKKUzVDa30Zz8Z5StU3+hzuTwzoefcC0JykbDoJEbis Rc4nuDX5L7iubh+onTFHnyUinLdY2EYdEL0xWhYPa53DXlO8O1lS0SVl0Re1BCTPhXyn TFV9Y1Gg7Ee2zwxc4DfrZOQ+g7k57XDYoL9MBVog77CXBXlM42wGzme1lvMmo0hVOatk 4rZg2gy+ohAR2L1BOgzDdxvJ3ZYdrKPi46/u/NY8anSLme0qf4DXhmXG774Ld4EbDw4U wgQQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=JlIYd9ywj5EIyY4zX2FoqGOxaoeleW6JljiD77HSofw=; fh=pYQrMWRbkoOftEfpHYa+n7bWXefjxt7OrJ23IGl4uTo=; b=aAfGyEpGIWMSIrB6pJFhtw47pf9s6mZDD+lT8D9EzsPTUwYY3i0m/q5AFoAMXNm0sP 6Ab6ZPkclzoLGiySzmwRrem6vEgHIzMakOGDJR39t+K4XsbgynVWApwLeGwktxKwsa4T 0XCAx3dLijfyRaM0ZslPFUaAB0FCV4GO/CyUDiDJtsLk54DKMeuU6ry3ECRAWkHbCK+B ngYkykOP+ZF26MRGKxb7wppZ2aTydaNuqmVsvFfzJFAw4BMlymdur4COFGjILGU7v/YD dBtqQ8WptKLosb+HFio5EV/Ea6OSMkwqJyImVAV5tOv4WKEuBX3k6XOmzPTBL+eI+0jz XSkw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jmPDn6O9; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-181167-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181167-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17b21dcesi895833466b.437.2024.05.16.07.23.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 07:23:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181167-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jmPDn6O9; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-181167-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181167-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3BC0A1F22732 for ; Thu, 16 May 2024 14:23:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5244D14A097; Thu, 16 May 2024 14:23:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jmPDn6O9" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7BDAC1474C6 for ; Thu, 16 May 2024 14:23:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715869414; cv=none; b=APHzfpe0O9wUHDhD1zx0u5/MJZFU8rd3Rd2MOxOYCo+XQPXJVx7bgC9eQSg9lb6FYJ7JtXoofRWdOqzcz70XF7Dh5Rk+mKMZ/X7Rn4E8dggW5Otf+ZbN91vvjEhevzBaJIQbJuE2uzQmGO8yXvzoUz4CFmGC+vRCJT3iemOicV8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715869414; c=relaxed/simple; bh=8fNegGSOeNs3leFAk+15asKlQPUrZveHOUDfXJ+0KZU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rTp0l8aflaM+PP1PhPBjV8AFUnXqsSyNHKFzf+SJpzIyJRTVJ99mdPy4YeRQ3RzpTN+/PKEp43GfcqHt53vGTXppHGbAQu/UySeYF1OHe/5tc7/vdsPfXyKfZPvuKO7EVq1K85VsgPxqGW6G7dO/GWcumSp3Qfx3Vys6K8Xe3Bo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jmPDn6O9; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF14FC113CC; Thu, 16 May 2024 14:23:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715869414; bh=8fNegGSOeNs3leFAk+15asKlQPUrZveHOUDfXJ+0KZU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jmPDn6O9+rWX7Gdr8rt4wIBLOYlc4x+e4RfeLUvx5hcTf2h0H5wg7cEXlwgDSMQND 0HWPFq0OiTStpjcPlFaI8enotPGNPKVrs2JjvS39wxJ2Swbu1okOgcaeL4t3MVEc4K nKgCN+ULp+pfDe1dXajkXUFdTCPNt2qLq14W6D9e9xG1eMI5Qxus0lqJy8QY9CBH0q 6hQ3U64b7FRPiFC1fNQXoOaoI+KstJpU3IzlnghN2zwJiuBNMzwebTUH8uXqEEARJe sRNmzLymNkbcrNGBprf7CU/w2BNWHrKVG+2k8LGUsT2TsVMapHFdix2kHYMC0rAWit M/vla6+goWeEg== Date: Thu, 16 May 2024 16:23:31 +0200 From: Frederic Weisbecker To: Peter Zijlstra Cc: Yun Levi , Joel Fernandes , Vineeth Pillai , Vincent Guittot , Dietmar Eggemann , anna-maria@linutronix.de, mingo@kernel.org, tglx@linutronix.de, Markus.Elfring@web.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4] time/tick-sched: idle load balancing when nohz_full cpu becomes idle. Message-ID: References: <20240508172621.30069-1-ppbuk5246@gmail.com> <20240509092931.35209-2-ppbuk5246@gmail.com> <20240516075628.GC22557@noisy.programming.kicks-ass.net> <20240516084911.GF22557@noisy.programming.kicks-ass.net> <20240516140003.GJ22557@noisy.programming.kicks-ass.net> 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=us-ascii Content-Disposition: inline In-Reply-To: <20240516140003.GJ22557@noisy.programming.kicks-ass.net> On Thu, May 16, 2024 at 04:00:03PM +0200, Peter Zijlstra wrote: > > If I make you annoyed I'm sorry in advance but let me clarify please. > > > > 1. In case of none-HK-TICK-housekeeping cpu (a.k.a nohz_full cpu), > > It should be on the null_domain. right? > > > > 2. If (1) is true, when none-HK-TICK is set, should it set none-HK-DOMAIN > > to prevent on any sched_domain (cpusets filter out none-HK-DOMAIN cpu)? > > > > 3. If (1) is true, Is HK_SCHED still necessary? There seems to be no use case > > and the check for this can be replaced by on_null_domain(). > > I've no idea about all those HK knobs, it's all insane if you ask me. > > Frederic, afaict all the HK_ goo in kernel/sched/fair.c is total > nonsense, can you please explain? Yes. Lemme unearth this patch: https://lore.kernel.org/all/20230203232409.163847-2-frederic@kernel.org/ Because all we need now is: _ HK_TYPE_KERNEL_NOISE: nohz_full= or isolcpus=nohz _ HK_TYPE_DOMAIN: isolcpus=domain (or classic isolcpus= alone) _ HK_TYPE_MANAGED_IRQ: isolcpus=managed_irq And that's it. Then let's remove HK_TYPE_SCHED that is unused. And then lemme comment the HK_TYPE_* uses within sched/* within the same patchset. Just a question, correct me if I'm wrong, we don't want nohz_full= to ever take the idle load balancer duty (this is what HK_TYPE_MISC prevents in find_new_ilb) because the nohz_full CPU going back to userspace concurrently doesn't want to be disturbed by a loose IPI telling it to do idle balancing. But we still want nohz_full CPUs to be part of nohz.idle_cpus_mask so that the idle balancing can be performed on them by a non isolated CPU. Right? Thanks. > > If the CPU participates in load-balancing, it gets to fully participate. > If you want to get out of load-balancing, you get single CPU partitions.