From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) (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 2E8FB27FB3A for ; Mon, 20 Apr 2026 15:12:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776697927; cv=none; b=c2CzcYwfIyCPOqcK23zv0REUgDqeaIODNDGGC6LcyFvz+GmeJiOnS3O0eQUCfyqIxQI7yhjgINuvhvn8P+AtUbbuscFVBc2D2CHHcakLxSRDYlLlbFGWo69rEyHrYKmT6Kx9sOP1r0VGoI2SJ1fUdENKG388mK7xSCEr6gGo8qA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776697927; c=relaxed/simple; bh=bVRFppeRBD+RgwIoaV2mBXyf6u1g27z+N3mgh0JJ4ZI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uUExA1LpFAzBi65b6tFeVOEULfhyodj3HJDwAdcyq2yAblNF+rPKdA67pO0OWX0XnGqD15rfGJ9BYPuJX62PnJJuqYHb52CpF9QYC05Xc4QfqOdUjS+P9azEZB//yne4hTjrRtcc7C6yh+qzU5Fkk8G8UViKms8WoRmnMt8xUgY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bBNN/thc; arc=none smtp.client-ip=209.85.216.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bBNN/thc" Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-35d9f68d011so2053384a91.2 for ; Mon, 20 Apr 2026 08:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776697925; x=1777302725; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=wHNE5ar4Vwoc6rK3RRSpgvp9k4ljOyO8+zo3RBbEFLs=; b=bBNN/thcLmhxaq8dZXTbTVKSzwgUGVyGryoqqUoFgT2mKkpFM5hXf9QUSmD7u/4ns+ Vcuoe3G92ybfH+aSgYtGRFXYj8iT/dEh478Sxdl92T3/bK1PHARAkShnsBlewJ6XTUS2 wZDS9gyGENeWcXnpK96NxkW+VkZppttC0OIDnq0N7a0IAAfi5fIrUnUF6duH7UetRY9U DiNWJk5NCNH3vDw9woTdwYDoI1vXJnBh5uAfn2Ge+HUiwDPkFF9xesykgUIDBMIolEqt jtk6pjzzg9Dg/MJtrgQatHSR7VtTSEu1Is5LG7QFhUMNYEqCSOfxP/8uN/SLpevowwCf EyCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776697925; x=1777302725; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wHNE5ar4Vwoc6rK3RRSpgvp9k4ljOyO8+zo3RBbEFLs=; b=mxwJTWAVvG0R/px3EfxW8JFTM3ZOFC/QBjLTycwHlqlTUt6/AW9vkoqaQWZGqbtbNs ZkoQh5jHc/D9MvRjGvEGw8vXT1aN/PZVh8pWmGpk5SsZyQvRJXPNl6Oe5eHh4eykNDh/ Ba1XlwTwZqb3C0L9zb/MAJ+894t+u76JlW6VOenTO9lzKilxXP0uSZuIwhtRidXXrrsf 8q7kom3uPw4pfcX4+xsXMbPKKQaERoYSdY4OkSRoxDk2air+kc+dTXBp8GwZ1gWfZY/I t7yKwylAwflu2IIucUyeAbafELjC0j138r079FnCdds14ekGfEjqngkcbezXTnz6+ZRw dyWw== X-Forwarded-Encrypted: i=1; AFNElJ+Xc3d9Nlf+Ud9T5MIMSnxIGB107m7JiTp5mtCCVhBAlrKki42IOLCAL2s8t+xe7dC4ZaFIhnFS9h/Au4k=@vger.kernel.org X-Gm-Message-State: AOJu0Yxsw5/UTHx8abi87Ma4ZTF/qZ0n3zZn2zoO3IixuUZMbcSci8Jd /DHQBNT3NNLnbm/AbB52i4napGun4BZELkwizP2fOSTtqXsteFXWtFrF X-Gm-Gg: AeBDiev71cnKFCuxGAGxbPLlBvS8CXZLCkSQARMlcwwngA/oE7Jz6BsLVqD+54pmZrT 9DuZX+u6VCHJ6gdcQBbfaJHTYc9nvyTD4OOUyQegLhyvJ/CdBtC6V4/8BC2TWJSxSxfUI3/mNIo 15SHUFpMAY2Cf8pGSYEmegXHL7Ai9tpJ6fWX3E1OYnP5mpcxtXiDHV/yxt0pge48efaPl1d/xY7 YYFLsxqlZMEKtyWhcFLJNPYdsRZqGnS4r+Wp+0HD7ariQEtRVcA9Wm4pK5AisFWY32w9264fIDK rrOviI9hSWQSYhVeXmi0JdJDjSw6Y/NTvuQntDnU1gfWFHpbyaZBcGDO+TJ1D4kMg3c9Dqpo4r2 xVil0oHG2Uvlp50KNFFxTQP1G8zLGfHzEx/9uybxh8phi57baQuFDGwwak0SpPLwrjMh3n3ri8t Plfy79YfwiUFfbCYrSElgAAo3i5T5wSIR0hRV3V/0O6al4Xxe3kp3kBC6GlMdF1yKURXVqDaml7 mExEcNqa59hgt1K X-Received: by 2002:a17:90b:164a:b0:35f:b572:ece3 with SMTP id 98e67ed59e1d1-361403bd001mr14763148a91.6.1776697925137; Mon, 20 Apr 2026 08:12:05 -0700 (PDT) Received: from cchengyang.duckdns.org (36-225-97-241.dynamic-ip.hinet.net. [36.225.97.241]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3614189343esm10729449a91.6.2026.04.20.08.12.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2026 08:12:04 -0700 (PDT) Date: Mon, 20 Apr 2026 23:12:01 +0800 From: Cheng-Yang Chou To: Kuba Piecuch Cc: Tejun Heo , Andrea Righi , Changwoo Min , David Vernet , linux-kernel@vger.kernel.org, sched-ext@lists.linux.dev, Ching-Chun Huang , Chia-Ping Tsai Subject: Re: [PATCH] sched_ext: Documentation: add note about multiple ops.enqueue() calls in a row Message-ID: <20260420230420.G737d@cchengyang.duckdns.org> References: <20260420143939.3636883-1-jpiecuch@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260420143939.3636883-1-jpiecuch@google.com> 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? > 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 > 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 > -- Cheers, Cheng-Yang