From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796051510; b=MuWlhz+TkQMIycVL2rjRT/REwj2YMcvb5/MlhyS5d9DEVI98WxvJLInxeW4L+t7mraMh saa1DRUSyKkT7Tg7aQLkon/HeXug5NXXHJB4osGJs17anGRQlt4jva+pkNgIGlmeWCp4s +wp2/3tz08+MufW+KMBvdKVMc5wymbZIjnp2IWZ+rMyMm0evruxowgPQf+uuPnZrYdFko 4XLKI58i+EK+kt9onDo4Tl2fOQ5VCrcrp2AKuq/tAsvto+DkmJRsIkuoYqXirvsjncaal AOKStiBybKbjsk+2ZjoJBkVUOsTaLBH/G/SDuCpBXYVspDFkOluquGabrbh5ArGUgqg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796051510; h=Received:DKIM-Signature:Date:Message-ID:From:To:Cc:Subject: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=DDGMdVkNIBGeTR8hjMZTQmJv6ThXXicBRhU6vfJ8/Ho=; b=OjgntAIDD/L/sC+Y8R0GqC/8JCFMM9uatFLYZe75pSNT1UN5/EQbeZX4xLTPU2jOICap Kl0ccXoC8iIrptQ++wO966LtqtfGadj3BGK9MD8wxcC1U1rkOalsx9wRWHG719FgceqYl JxuNHWu6BHJDWEfyS3uEnW8l+/xfiO4yaf9VfFUkEd/N3KY1D4XphxXSid6gih5CTp5HS Zb/Ino7tpJDh8+hWpxOgQkNiIeAVi7W4ZZzU0UNWQOfkwM6RID1P8u4/TYhCQiF0keNIb T6ia79/BFDWdbvJzsvtoa191i2f88SUyKSg0+qRifJlGeGL41EGqkL9ylOdJqmMrGEA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TT8pna4D; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 311E3606A31C; Mon, 30 Nov 2026 15:11:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TT8pna4D Received: by smtp.kernel.org (Postfix) with ESMTPSA id 685011F00896; Mon, 30 Nov 2026 15:11:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796051509; bh=DDGMdVkNIBGeTR8hjMZTQmJv6ThXXicBRhU6vfJ8/Ho=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=TT8pna4D8oxjQfboaGxMB8R1LgwEOhkB4QL8BN4KK7KoFtOgCrHh1Mj9t+anGgIBi uqHjwdJg2xCvlLEY2EgZlowen1GgQ4DvwplDp5E/VxGM1o/QxV6I9FyNIoGwv3yhj2 ZhwmpOrXtIYBZr2KranK0xLDgwv9jHBA/YmP3oytjUKgLruIIVhuEcXjjJVa4yQEWD NWaRbshUFGMPxGJouu/i0/Qh3CDHRLzAmHw/BQSQNTCxv6QGywQJg6MtWZXzhvq5jf JLQbHcpGaioq7q9rXZRZGRcPyzTotwVXmMk3qz3aGUenyjv2hmSVCUZFJzMP8AKmTs JUDqKMB8fvPzw== Date: Mon, 30 Nov 2026 05:11:48 -1000 Message-ID: <2c4bde68cd5b1ad1bbb7a3cc7d3e3139@kernel.org> From: Tejun Heo To: Kuba Piecuch Cc: Peter Zijlstra , David Vernet , Andrea Righi , Changwoo Min , sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 1/2] sched_ext: Reenqueue IMMED tasks when a higher class wins the pick In-Reply-To: <20261130111711.2673199-1-jpiecuch@google.com> References: <20261125114932.3198836-1-jpiecuch@google.com> <20261125114932.3198836-2-jpiecuch@google.com> <20261130111711.2673199-1-jpiecuch@google.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello, Kuba. On Mon, Nov 30, 2026 at 11:19:14AM +0000, Kuba Piecuch wrote: > I kept it for latency. The wakeup-time reenqueue returns the IMMED tasks > to the BPF scheduler right away through the deferred irq_work or balance > callback, so they can be moved to another CPU while curr is still on its > way to a preemption point. With only scx_settle_pick(), they wait on the > local DSQ until curr actually schedules, which can take a while if curr > is in a preempt-off or IRQ-off section. This is just from reading the code and I could be wrong, but AFAICS there are three cases where wakeup_preempt_scx() finds an IMMED task on the local DSQ which doesn't already have a reenqueue scheduled: 1. The CPU is idle and hasn't picked the task which was just inserted. 2. The CPU is in dispatch. 3. The task was inserted with SCX_ENQ_PREEMPT or SCX_ENQ_PREEMPT_LAZY and curr hasn't scheduled out yet. In the first two, the CPU looks to be already on its way to the pick, so I don't think there's much difference. In the last one, triggering from wakeup_preempt_scx() may be a bit sooner, but that doesn't seem that significant to me, especially given that the task was already waiting for curr to schedule out, which is the latency the preempt path already accepts. Am I missing something? Thanks. -- tejun