mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kuba Piecuch <jpiecuch@google.com>
To: Tejun Heo <tj@kernel.org>
Cc: Kuba Piecuch <jpiecuch@google.com>,
	Andrea Righi <arighi@nvidia.com>,
	 Changwoo Min <changwoo@igalia.com>,
	David Vernet <void@manifault.com>,
	linux-kernel@vger.kernel.org,  sched-ext@lists.linux.dev
Subject: Re: [PATCH sched_ext/for-7.3-fixes] sched_ext: Generate qseq from a per-task counter
Date: Sat,  3 Oct 2026 11:38:38 +0000	[thread overview]
Message-ID: <20261003113843.17313-1-jpiecuch@google.com> (raw)
In-Reply-To: <86a16fc6ea0a57cea7459ac2ebfdfc1b@kernel.org>

Hi Tejun,

On Fri, Oct 02, 2026 at 12:33:27PM -1000, Tejun Heo wrote:
> Maybe wrap the counter where the QSEQ field wraps instead of looping?
>
> 	p->scx.ops_qseq = ((p->scx.ops_qseq + 1) &
> 			   (SCX_OPSS_QSEQ_MASK >> SCX_OPSS_QSEQ_SHIFT)) ?: 1;
> 	qseq = (unsigned long)p->scx.ops_qseq << SCX_OPSS_QSEQ_SHIFT;
>
> On 32bit, the shift drops the top two bits of the counter, so the mask is
> what keeps the counter from reaching a value that shifts to 0.

Sounds good, will send a v2 with this change.

Thanks,
Kuba

      reply	other threads:[~2026-10-03 11:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-02 20:52 Kuba Piecuch
2026-10-02 22:33 ` Tejun Heo
2026-10-03 11:38   ` Kuba Piecuch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261003113843.17313-1-jpiecuch@google.com \
    --to=jpiecuch@google.com \
    --cc=arighi@nvidia.com \
    --cc=changwoo@igalia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sched-ext@lists.linux.dev \
    --cc=tj@kernel.org \
    --cc=void@manifault.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®