From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F37B3A4F20 for ; Mon, 20 Apr 2026 14:39:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776695996; cv=none; b=UtJjtxlfAv7WskfCGc3t2113QbRWb0Lc4vytdyTl7b5aSdICVcT8mkVu2vosShatu/iNa7D4soHIMaY5E53mA+/mN/0t1jG/j0F5IMAI5ookuXhXA2SrO7asDRS5t7xRu+B+DdCCveDX/yD4MpoL6/8DfxYycuXt1kQn3dFEfJ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776695996; c=relaxed/simple; bh=1bQYWQQPZTm0fo/5dwbu+faYIgDvfi4Vp/l1hT2D92g=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=UwTbhhHmbuuTSe3U0kr4Wd0rVahi+9TQxneyR16qnpa7m5QRycWPkoYgQj1thNtlZuG1JTYq5a7oP84HGq2dhBGRSXVFmEgse0sG+1UZaWOxK4XVgD9joHMQ1AshR70atbAiMQ9DaH7jO8JYto97fz9DpzpRgy64H4VTLhG6bzs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jpiecuch.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=WheRRyP4; arc=none smtp.client-ip=209.85.128.74 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.b="WheRRyP4" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-488c74405ecso27778095e9.1 for ; Mon, 20 Apr 2026 07:39:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1776695993; x=1777300793; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=ZxqxI9AIf4W3z8bVA2zxxlvVzCabYgXNqoP1Bzhfb7U=; b=WheRRyP42IrtSUNJ5w4zYWsVNkmBY51vIs4xMwIIHfxmoevWchUREVKLLrQQfjjGrM s9Sp75h/ne38HPVQpQpMNjZFN2Ia5hFzVgb+//x/U2a4Gh/+0miKdg7e66QnU69R99vP 7ceNy+/40+7CI1t5WWTVsYYDDuFqUJXCzKAp11B1TQqZCCoFD1ju5Um7VC+jbXzj5y7o nuyZcY0C247nhSaFur3tFPww1fyG3n5FZeGsQdmN4iVdZbcEWjO+9ZDHY/hX2gDYaaWj 8rEnbT7YYWcLPFdV1JBTNSK8/54sTvDxixuIjwGbaKuTlU7Uq1LJdhHpz/bBZLWKC/CJ IsIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776695993; x=1777300793; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ZxqxI9AIf4W3z8bVA2zxxlvVzCabYgXNqoP1Bzhfb7U=; b=U6K3cmgDupgWjh3LY0ZvEN7ebItBMJsJykjp26wNg0ILR1Y6qdEYLQOWkL8+1GFTLH cXT4PlObEoYbMJIksVRoMN7O5SKq1cxWA8b17jFSmeOQtimdW76KEPw5r8MGkUK7shmN 8TCAIbtx1BVa/XiVLsETcqxSi1WaNg0Pvj4OFVlJix+/qB4Ac8KVFjcWJBN7/0fKmrie UFlSE+Wuc14J6ic2XWhjemZrIyvN3W8mynv8VOzMYu/uD6+j1nvhUaG9KgCK8NQB30nM bFL1QYOs/LVE2wYptyMbGCCPPq6AotBgtQw19tQzBYhbTlmww0kqgm+nVCeVqdNRUbhs CcSg== X-Gm-Message-State: AOJu0YzhGXXRhHDXlfKDRtj41fWKuCikNUxyG+tuHu+QRszfWqeyR2zN ZcJNQmirpvkwkByYcZxxhfAMUdLoCXEjnz5f7yrUohqTy4q/TDpXxs6/Gs5loovDenffgTYMkhS 2CIBI0i/ypH9+yQ== X-Received: from wmlf19.prod.google.com ([2002:a7b:c8d3:0:b0:488:9d54:fad]) (user=jpiecuch job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:1614:b0:489:1e8a:90b4 with SMTP id 5b1f17b1804b1-4891e8a91e8mr25850625e9.21.1776695992838; Mon, 20 Apr 2026 07:39:52 -0700 (PDT) Date: Mon, 20 Apr 2026 14:39:39 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.54.0.rc1.555.g9c883467ad-goog Message-ID: <20260420143939.3636883-1-jpiecuch@google.com> Subject: [PATCH] sched_ext: Documentation: add note about multiple ops.enqueue() calls in a row From: Kuba Piecuch To: Tejun Heo , Andrea Righi , Changwoo Min , David Vernet Cc: linux-kernel@vger.kernel.org, sched-ext@lists.linux.dev, Kuba Piecuch Content-Type: text/plain; charset="UTF-8" Commit 84b1a0ea0b7c ("sched_ext: Implement scx_bpf_dsq_reenq() for user DSQs") introduced the possibility of ops.enqueue() being called multiple times in a row for the same task without intervening calls to ops.dequeue(). AFAIK this was not possible before that commit. Document this behavior as it may be surprising to some. Signed-off-by: Kuba Piecuch --- Documentation/scheduler/sched-ext.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/scheduler/sched-ext.rst b/Documentation/scheduler/sched-ext.rst index 03d595d178ea..fba09aa1cd4e 100644 --- a/Documentation/scheduler/sched-ext.rst +++ b/Documentation/scheduler/sched-ext.rst @@ -339,6 +339,11 @@ The following briefly shows how a waking task is scheduled and executed. leaves (e.g., when ``ops.dispatch()`` moves it to a terminal DSQ, or on property change / sleep). + Note that ``ops.enqueue()`` can be called multiple times in a row without + an intervening call to ``ops.dequeue()``. This can happen, for example, + when a task on a user-created DSQ is re-enqueued using + ``scx_bpf_dsq_reenq()``. The task stays in BPF custody the entire time. + When a task leaves BPF scheduler custody, ``ops.dequeue()`` is invoked. The dequeue can happen for different reasons, distinguished by flags: -- 2.54.0.rc1.555.g9c883467ad-goog