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 323FE17A31C for ; Mon, 20 Apr 2026 15:22:01 +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=1776698523; cv=none; b=rAyuWMTJuJ7SxLA5FUKF17o2odM2M9MbfFIzSlhmfXpgUCku6d4Z0zWz1AwVz9+TUxvk82dNjS71K67N19EA7ON3AfxU+Um7k/7cFbSRwzdF2ihge+w87oQiiRJUijlc+R1j4OjuhjvikFLbeb3N7Odc3KJc0hVlkHwh/HSlS68= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776698523; c=relaxed/simple; bh=4FBzaTTpqnBIU5pKUXm8hcufAfCWMbiCv8ZWdgT+yl0=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=I3niJDggsb6dd64UGfk/h+Cb7FOwG6x4IkTEpCrDaSJICdEGA0/MYjnD4ZoEg126aiVr2g4KMMzrWxa7xN0JjNmVL1LMIL6ggWA8RxKcwzsLpT33Bx8zXbLuehait9A3Sk+FQGQO2fkPU4lgNgyYoGxjDFCDkT33bmMMDmBXl8Q= 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=qXXvVRU1; 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="qXXvVRU1" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-488ba2919b9so24550165e9.1 for ; Mon, 20 Apr 2026 08:22:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1776698520; x=1777303320; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=OwGV37PmpmtYXDrq8CTJScazFpYTg5Jf3sXefLNUVm8=; b=qXXvVRU1qAgx1DgmhGN4pvnUOe571mf7rfE01kNJSN4Bwi+WgocYFKuHzxhuqA9gvx FQuyGraYiahzNd2BTeUsrghm+3D0Omwu9FHfmN21rhxXAlo2SGKpVrxOCL+JG5Q2wBcC bqbFecomxPJPs3/ZyFCjp0sm/s0ovGy4nQskVrORDruf3s97Dym7SB/pJ/XTmrfkAiGq kc8DYYEVgdnHvWwGf4/5UesJL4FYnn9pZiksohpJ0bhHb5y8tM/DhNKhU72iVXfXdM3v 2933GFgE9wuEpbvfT4rsrKRBSfw61mnKB2woxb/+nIPfhsBFC6Hm2osx/GkieoMvW5f+ EuIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776698520; x=1777303320; h=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; bh=OwGV37PmpmtYXDrq8CTJScazFpYTg5Jf3sXefLNUVm8=; b=XpyTBNbwYCxCjAFKtlZRk4uT8nDCK5QsBiHGXeoS3Tz7cLTzaNftp3t6nfziE8kicT 4HPbLAQsv9AACUsM1M6v8WpEM3T8UXYVrEC597WKn9M5XiwZhwYN+ijt+ZhnqVMdzKLS kyTUh9+a5OOucdwPaEhChyaFl9VE5mHSb2kQ5X+hNAEYrNGafeeClOs0cJEKArg7k+QE lpoEO8HZ0rJezLaliPkGHIy/sB0hINLL+b72J56ZNUyfHeApWAzLBzTx6CTFet+xua78 p8XoKEpfX4+L9/Ots5WXV0pOqRSu9gxcA95kEL6qPgxkAU6KCr5i7yZ6z2UIaxDRDPav oDmg== X-Forwarded-Encrypted: i=1; AFNElJ9FJCo/zpvai+HtfR+EbLRhUI5422NUk5rJ3BbHToylNnFpqonsuYOrqq8oBGC8PYE+6YNCoMh6JpEJlhw=@vger.kernel.org X-Gm-Message-State: AOJu0YwLYWK+G53CmcwruaBHGTraYsEHsgJ7iXwKg9DoQSByyEoIAVFW 8HnenB4vtVcePifWxwEvvE+NEM6jjFu6ic/nT0F2ySJsncQFjfU2/Bx3zJeQd3+kwYK8s0DjgQg Un6a/ccZVnSRXVA== X-Received: from wmjl23.prod.google.com ([2002:a7b:c357:0:b0:485:f1d7:164d]) (user=jpiecuch job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:8586:b0:489:e49:f766 with SMTP id 5b1f17b1804b1-4890e49f7d8mr63279735e9.17.1776698520338; Mon, 20 Apr 2026 08:22:00 -0700 (PDT) Date: Mon, 20 Apr 2026 15:21:59 +0000 In-Reply-To: <20260420230420.G737d@cchengyang.duckdns.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260420143939.3636883-1-jpiecuch@google.com> <20260420230420.G737d@cchengyang.duckdns.org> X-Mailer: aerc 0.21.0-0-g5549850facc2 Message-ID: Subject: Re: [PATCH] sched_ext: Documentation: add note about multiple ops.enqueue() calls in a row From: Kuba Piecuch To: Cheng-Yang Chou , Kuba Piecuch Cc: Tejun Heo , Andrea Righi , Changwoo Min , David Vernet , , , Ching-Chun Huang , Chia-Ping Tsai Content-Type: text/plain; charset="UTF-8" Hi Cheng-Yang, On Mon Apr 20, 2026 at 3:12 PM UTC, Cheng-Yang Chou wrote: > Hi Kuba, > > On Mon, Apr 20, 2026 at 02:39:39PM +0000, Kuba Piecuch wrote: >> 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. > ^^^^^ > Nit: Do we really need this line in the commit message? > Perhaps we can just drop this? I put it there just in case someone was actually aware of a scenario before that commit where we can have multiple ops.enqueue() calls in a row. Regarding removing the line: yeah, I guess it's a bit redundant. I'll send a v2. > >> 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. >> + > > Thanks for adding and clarifying this. ^v^ > > Acked-by: Cheng-Yang Chou > Thanks, Kuba