From mboxrd@z Thu Jan 1 00:00:00 1970 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 213A92D2497 for ; Wed, 19 Nov 2025 22:31:10 +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=1763591471; cv=none; b=s278LqgPZP6vLnvTSSynkegYfwDyQYBQWRY8x5c9GxSgrgAf/A6/vrvu0OKCDUKgA7Wr1pBLt3zctPC3q0yWWYKt1E3ozuGAKpmVHVng6GMDghSmUHwkxolvf5tXIfkwNcBvVb9FybYxNNX+xq/Vznq2IfAQRRfGvvOJHJu7YCM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763591471; c=relaxed/simple; bh=uAbEgKlt9ikf7k7q+IM18Q2cDHBV68fVRhA5J3ozZOY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rr3gE4GOvgEy5CjvAIhzBO4tpWt9XtSdNQTKK6/0Tocdjr5nBUt1tBv80EgXOoqKUO0GumEe1fiYyN9DofIW77Hd8S5xTdMCbQL6TUd5yKLsrzXG7/Vlpf1lT3/GyfoypDpheRF9OvpFHhrfl1l9uSSkCTsFxkRqQr8OZJAzPQQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CWXTvyEi; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CWXTvyEi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49800C4CEF5; Wed, 19 Nov 2025 22:31:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763591470; bh=uAbEgKlt9ikf7k7q+IM18Q2cDHBV68fVRhA5J3ozZOY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CWXTvyEiwBftf+drOVFrUEb605NuIEAxvh1PzelnvNRtzM3LjljzlGJsd6ToA/Anu 15XdWTh+3srBe7Hs808FOePRGvn4kP40HsnORDnfLhtXe00T7bx1snuSplxdU/pFOw +tQJUiaB8tA2TAJ9TD202NVx0R6VnuzSMGjfZiBZ2cpL9HFgjvCLspTVHDUUrK0QwJ s6D0TBJoD/J/G0KVycfqEQEGTdqcDa7lN7ymfV0WsT2UGjXeYPbCOaN0x1ZaC5cCdZ CkS6CoTey6RMPKrrOQCdSd7J7xl8eSHWqfmkjL8fw5ERERcR8wdVSJ+Zb8KnjYH7TV oJkCTlW5Bi+6A== Date: Wed, 19 Nov 2025 23:31:07 +0100 From: Frederic Weisbecker To: Thomas Gleixner Cc: Gabriele Monaco , linux-kernel@vger.kernel.org, Anna-Maria Behnsen , Waiman Long , "John B. Wyatt IV" , "John B. Wyatt IV" Subject: Re: [PATCH v15 7/7] timers: Exclude isolated cpus from timer migration Message-ID: References: <20251113083324.33490-1-gmonaco@redhat.com> <20251113083324.33490-8-gmonaco@redhat.com> <87pl9eklvc.ffs@tglx> <87jyzllwhd.ffs@tglx> <87fra9lnsw.ffs@tglx> <87cy5dlll9.ffs@tglx> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87cy5dlll9.ffs@tglx> Le Wed, Nov 19, 2025 at 11:10:58PM +0100, Thomas Gleixner a écrit : > On Wed, Nov 19 2025 at 23:02, Frederic Weisbecker wrote: > > Le Wed, Nov 19, 2025 at 10:23:11PM +0100, Thomas Gleixner a écrit : > >> If you want to be a bit smarter, then you can just use a global mutex, > >> which is taken inside the set/clear_available() functions which > >> serializes the related functionality and bulk schedule/flush the unisol > >> (make available) first and then proceed to the isol (make unavailable). > >> > >> Then nothing has to change vs. the set/clear operations and everything > >> just works. > >> > >> That mutex does not do any harm in the CPU hotplug case and the > >> serialization vs. the workers is not going to be the end of the world. > >> > >> I'm willing to bet that no real-world use-case will ever notice the > >> existance of this mutex. The microbenchmark which shows off the "I'm so > >> smart" metric is completely irrelevant especially when the result is > >> fragile, incomprehensible and therefore unmaintainable. > >> > >> Keep it correct and simple is still the most important engineering > >> principle. Premature optimization is a guaranteed path to failure. > >> > >> If there is a compelling use case which justifies the resulting > >> complexity, then it can be built on top. I'm not holding my breath. See > >> above... > > > > Perhaps the only thing that worries me is if an isolated partition > > is inverted. Say 0-3 is non isolated and 4-7 is isolated. And then > > cpuset is overwritten so that the reverse is applied: 0-3 is isolated > > and 4-7 is not isolated. If all isol works reach before unisol works, > > then tmigr_clear_cpu_available() -> cpumask_any(tmigr_available_mask) > > won't find any CPU left on the last call. > > schedule the newly available (now unisolated) ones first and flush that > work. After that you can safely mark the others unavailable, no? Yes! -- Frederic Weisbecker SUSE Labs