From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 348FE20459A for ; Wed, 24 Jun 2026 12:27:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782304025; cv=none; b=UFToGhds2N15vylkGK3U6GTYw5B9wTqovSKUxY5O0NeXn7yRGo+3DmPVXZ3NQmerUmJ2EtQJsvW6SxOjXJs6G8BMyP02vT+9sElvn0AlEFnzH8/sxNhaYQpAbRzj4kAFyOoO4Lk6C+BRdFgluS9Fd0zlaxk9YTJmfZhjK8Zk2Gg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782304025; c=relaxed/simple; bh=59HWKla01VHuUF30is4DRAxpqC4W4y1XVss7ODd3Ssk=; h=Message-ID:Date:From:To:Cc:Subject; b=NDQx6t5DaKY2Qo7abn5UV6A2HcKUH0E0Y7Dd9FJdQ+e6u+Vz9qFgd9xsy0q5xhHwsjh+GKJEaBT5Zzfj5oEevrCcu9PI0X+807WLlSiVijAsn5TD7ZJ7mr3MUATlkP6PpUk5HJzjZnQV4hKm/M4hqLsvsWcKeUJMNZeO458W+ro= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=V7azR5Td; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="V7azR5Td" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Subject:Cc:To:From:Date:Message-ID: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To:References; bh=m4gvVkyNv1v1gYnGMbBEuHShywcDNnfP+ad1e39pl8I=; b=V7azR5TdjEkky0Rvbk2Da5P+Fg VKZGdPlcMS7cRLjIzhjUTuP5xDsmtjTYjM++6ClpH+Pkc7U8AOvwD9H0DM/xXd8qvGgCMBRSgQBHF 9h2TtuXJHXbiplNQXzzmcgNQDzvKKbBuLlm/PjtVvG3LCoxsyNudOST4JckNugd6oJV13s93eMZVZ 7VemFs5CvWpKUDcAML7AvqKMPv+rubmnn+ZEE9ORi/Fez+4ViUqXx5LyzSSPA6cSnEVF5IJu7bp3J KlRrl9Qu+9J0m0AotY7Ohq535cMdTXVuAKlUuMHyre+1y7yo8kEOkCc81dyDldQfEsJ8Xnxn5wrg/ AKPlA8LQ==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.99.2 #2 (Red Hat Linux)) id 1wcMgu-00000002Kno-2ttB; Wed, 24 Jun 2026 12:26:52 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 0) id E5E8A300400; Wed, 24 Jun 2026 14:26:50 +0200 (CEST) Message-ID: <20260624121327.190063948@infradead.org> User-Agent: quilt/0.68 Date: Wed, 24 Jun 2026 14:13:27 +0200 From: Peter Zijlstra To: mingo@kernel.org Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, kprateek.nayak@amd.com, ziqianlu@bytedance.com, tj@kernel.org, williams@redhat.com, jkacur@redhat.com Subject: [PATCH 0/2] sched: Remove sched_class::balance() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Hi! As mentioned [1], I was going to move sched_balance_newidle() into balance_fair(). And while the patch was quickly done, something didn't feel right. The two things that bugged me were: - core-sched only calls prev_balance() on one sibling, not allowing the others to pull tasks; - both ::balance() and ::pick_task() take @rf and do balance operations. That latter is because of ext; the DSQ move needs to be undone if it turns out a higher class will get ran after all -- this is where ::pick_task() got the rf from and why I moved its balance into pick_task_scx(). After a bit of puzzling and a few wrong turns [2], I think these patches do away with sched_class::balance() instead, less is more and all that. [1] https://patch.msgid.link/20260611113219.GG187714%40noisy.programming.kicks-ass.net [2] I'm pretty sure I messed things up a few times, but rt-migration-test never threw a failure on me -- which suggests it isn't very good at finding fails.