From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.71 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796037558; b=Znl95IajPArztK70UNxQW33XPuIMKgijYrGfVGlkpGeu+ddPkOUhjskGSNV/qUPGprHR Oi7WwRiNOQDdGmthgS2uqgpvsUxSwqKaUdHBmx34rMa6FlYCsIzKXQ/czlEQoiNXhCWip pmbqoGAkM0tbiiJPacXl0T82ICHx8Kd3EbtDDCjuEmQqOY5duXHZ3ezuZPahgwcxjZn2J rZVwT74J7gNPRLXy4kZKKt+txBvGWFQyjtiFFcV/b4ZNUL888g+0GXHtvTO7f0CsFfj5E KE2I67e4nCLwZURWo+/aecWdM6XPF1IcRi3t+AJV8LPgWovNE+/k5mTGc9e30ogs+yQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796037558; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:X-Mailer:Message-ID:Subject:From:To:Cc: Content-Type; bh=RJJQ+KBujF7ZIhul7YmJPeEaiIZ+aoX1d3U+oF2I+zQ=; b=vyEzj7EuXfX8JgladJPn9HCidWNhWwAiNZsWXHnYATRqT2+eUbPZPw8ZGCyhySDsL9Bp bBOev46mehuroGyMC2XWIZPnZfpgMNUJ4X3pJtk0vl8cJmANSFEUsW0kmJdNWRnd1NbMX 9IwQ0KQ4WDnOQJrRW1DFeD70h+gt4EfIXLL5JT4vhroh6qhwAyJz2EWqDd45AuSjVdA6Y FGsP7ybmUtL7mYANiWD6HmkPxL7x9sbpe9z1JDmpBfOGFp5AHOXnAg7sNg95qfMmkBjHz YZpL2Q3M0z0aHvjtb2Cvac5XzvhNYxspdoc7f8T8+6YFXWhi0lXwwmPnsvZO71wp4BQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--jpiecuch.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=YMFLatZ3; arc=none smtp.remote-ip=209.85.221.71 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 539B8606A6A4 for ; Mon, 30 Nov 2026 11:19:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 539B8606A6A4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jpiecuch.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=YMFLatZ3 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-4a68703d177so4975076f8f.2 for ; Mon, 30 Nov 2026 03:19:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796037556; x=1796642356; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=RJJQ+KBujF7ZIhul7YmJPeEaiIZ+aoX1d3U+oF2I+zQ=; b=YMFLatZ3liZTo3Havh3RwMj1h+GlrsSTjmo7sIA/M/C57nPjcob1hgWYpPDE8KHkXB a2DRzbBfYNnQvfFuwTr9u4UF9SfiOszJxzeXDxuCFgVW5lMYo0NEt/iPu+AT3M1aMV6C 2HfUR1vK2gTObD8ND7z8FtzjYCIkGRC9CNE3uL4IdH++SRnPPCvzhdn67MZrcPPImvde z6HKfqjMFMS2XrB8bGcOT99xlAhvn4naAx/favKvmyDeFECey2tnsh8rDr0Epwp/rYET V3GnH3s4mv6KQtlv7RvUUmxdV9Ctm4wHTEOlbQbu8Pw2h+0Ivj8beG8syXbARH+V3Axe TaDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796037556; x=1796642356; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=RJJQ+KBujF7ZIhul7YmJPeEaiIZ+aoX1d3U+oF2I+zQ=; b=fh1JRtyQh2WvEvAY/CdnbXcCtPGAWpDEfIgxSGY6LefSRwN6nhkouZTcYg9SCVicP0 MaURD/UX1EQvKulpLIJRo00Z+sNsVtgzKHbVCD4GvV6RZ/ifTM54pHYQnn14HOtK/Ve7 sWX9+TpvCXefMqshFG/C2HHNLrJcu85Y3cszglol0xpjRjXVCcUXV4O7lfNo9gUO71KL Juubr56iihCnpP3+Bs3ls3HgR/Xkc2qfGHcms6411c/UDWcJ3HOQkQsmmlGqAB8ML0OA WgnE10cgBM9aZ1iE2kb2jLhHIMuxqgSBF3vwnFmo3Zf7wD8f2JBc5qlyIq9yy2EaANvB Icgw== X-Forwarded-Encrypted: i=1; AL+hErEb/fz7VslqhsCuV/tfS5JY0Dr7Zz39a3betL6jR8qsTZrVz5ZICJyY4c4A6fCicYYs+V8pCzuTTGTc2yI=@vger.kernel.org X-Gm-Message-State: APuU4Z85yhqhT3ItC75nV+fqM3QPP2Wd2bWImEuamzJ8/62KN/4w/SXY cvFn1TL7Dgx4EyM/91dQ4WeBVgyz5lmGpqSKF/Mekt98J5vXHzNQ1oPD/3lymyFzobkQ0A1ABTf Fp2v3/tcwhbyc8g== X-Received: from wrpe4.prod.google.com ([2002:adf:f344:0:b0:4a4:1f14:554f]) (user=jpiecuch job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:2505:b0:4af:7577:65b2 with SMTP id ffacd0b85a97d-4be44a3a2ddmr27429052f8f.52.1796037556259; Mon, 30 Nov 2026 03:19:16 -0800 (PST) Date: Mon, 30 Nov 2026 11:19:14 +0000 In-Reply-To: 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 References: <20261125114932.3198836-1-jpiecuch@google.com> <20261125114932.3198836-2-jpiecuch@google.com> X-Mailer: git-send-email 2.56.1.839.g22a8290db9-goog Message-ID: <20261130111711.2673199-1-jpiecuch@google.com> Subject: Re: [RFC PATCH 1/2] sched_ext: Reenqueue IMMED tasks when a higher class wins the pick From: Kuba Piecuch To: Tejun Heo Cc: Peter Zijlstra , David Vernet , Andrea Righi , Changwoo Min , sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Hi Tejun, On Fri, 27 Nov 2026 15:10, Tejun Heo wrote: > Yeah, wakeup_preempt() misses the transitions which aren't wakeups. This > looks correct to me, although it also looks like it can replace most of > what wakeup_preempt() covers. Right, the reenqueue in wakeup_preempt_scx() is no longer needed for correctness. wakeup_preempt() always follows it with resched_curr() and raises next_class, so rq_is_open() refuses new IMMED insertions until the next pick, and that pick lands above ext and runs scx_settle_pick(). 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. That said, if you'd rather have a single place for this, I can drop the reenqueue from wakeup_preempt_scx() in v2. Thanks, Kuba