mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shrikanth Hegde <sshegde@linux.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>,
	"Shubhang Kaushik (Ampere)" <sh@gentwo.org>
Cc: Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Valentin Schneider <vschneid@redhat.com>,
	K Prateek Nayak <kprateek.nayak@amd.com>,
	Shubhang Kaushik <shubhang@os.amperecomputing.com>,
	Madadi Vineeth Reddy <vineethr@linux.ibm.com>,
	Christopher Lameter <clameter@amperecomputing.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v2 1/2] sched: Document WF_SYNC wakeup placement semantics
Date: Fri, 18 Sep 2026 19:25:36 +0530	[thread overview]
Message-ID: <1a0997c8-844c-48b8-8a66-47bfae752a09@linux.ibm.com> (raw)
In-Reply-To: <20260918113349.GM776954@noisy.programming.kicks-ass.net>

Hi Peter,

On 9/18/26 5:03 PM, Peter Zijlstra wrote:
> On Thu, Sep 17, 2026 at 01:43:24PM -0700, Shubhang Kaushik (Ampere) wrote:
>> WF_SYNC is supplied by callers that expect the waker to schedule away
>> soon. The fair scheduler can use it as a placement and preemption hint,
>> but its semantics are not documented.
>>
>> Document the stable fair-class WF_SYNC semantics. WF_SYNC is advisory:
>> it can influence placement and preemption, but does not guarantee CPU
>> locality, avoidance of migration, or immediate wakee preemption.
>>
>> This documents existing behavior only. It does not establish a new
>> WF_SYNC placement policy.
>>
>> Signed-off-by: Shubhang Kaushik (Ampere) <sh@gentwo.org>
> 
> *groan*, why not just a comment that goes with WF_SYNC? All this
> documentation stuff is a dumping ground for bitrot.

I suggested to document this since there were atleast 4 proposals around
modifications of WF_SYNC and it was very confusing.

Did you get a chance to look at below abuse of the sync api?
https://lore.kernel.org/all/20260714013940.4068189-4-srikar@linux.ibm.com/

For that reason, I think either document/comment around what's the expectation
will help. Either scheduler need to account of all usecases of even when users of
SYNC misbehave or such callsites must be fixed and SYNC behavior can be kept minimum.

  reply	other threads:[~2026-09-18 13:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17 20:43 [RFC PATCH v2 0/2] " Shubhang Kaushik (Ampere)
2026-09-17 20:43 ` [RFC PATCH v2 1/2] " Shubhang Kaushik (Ampere)
2026-09-18 11:33   ` Peter Zijlstra
2026-09-18 13:55     ` Shrikanth Hegde [this message]
2026-09-17 20:43 ` [RFC PATCH v2 2/2] sched/wait: Clarify WF_SYNC wakeup semantics Shubhang Kaushik (Ampere)
2026-09-18 11:37   ` Peter Zijlstra

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=1a0997c8-844c-48b8-8a66-47bfae752a09@linux.ibm.com \
    --to=sshegde@linux.ibm.com \
    --cc=bsegall@google.com \
    --cc=clameter@amperecomputing.com \
    --cc=corbet@lwn.net \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sh@gentwo.org \
    --cc=shubhang@os.amperecomputing.com \
    --cc=skhan@linuxfoundation.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vineethr@linux.ibm.com \
    --cc=vschneid@redhat.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®