mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Prakash Sangappa <prakash.sangappa@oracle.com>
Cc: Madadi Vineeth Reddy <vineethr@linux.ibm.com>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"mathieu.desnoyers@efficios.com" <mathieu.desnoyers@efficios.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"bigeasy@linutronix.de" <bigeasy@linutronix.de>,
	"kprateek.nayak@amd.com" <kprateek.nayak@amd.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V4 1/6] Sched: Scheduler time slice extension
Date: Thu, 15 May 2025 05:01:59 -0400	[thread overview]
Message-ID: <20250515050159.3dbba5f5@batman.local.home> (raw)
In-Reply-To: <E2C65493-D9C0-42E5-A8C5-091FE2394216@oracle.com>

On Wed, 14 May 2025 23:12:26 +0000
Prakash Sangappa <prakash.sangappa@oracle.com> wrote:

> > As mentioned in previous versions, does this not change the semantics for
> > sched_yield()? Why is this necessary to immediately call schedule() and skip
> > going through do_sched_yield()?  
> 
> Expectation is that the user thread/application yield the cpu once it is done executing
> any critical section in the extra time granted. Question was which system
> call should it call, and yield seems appropriate.  It could call any system call actually.
> 
> Since thread is just yielding the cpu it should retain its position in the queue. So it does 
> not have to go thru do_sched_yield() as that would put the task at and of the queue.

If it was granted an extension, from the POV of user space, it actually
shouldn't keep it's place in the queue, because it's place is currently
"promoted" and according to the scheduler, it shouldn't be running in
the first place. But in the kernel, we are just dealing with
implementation details. Going back to user space should cause it to be
scheduled out otherwise it shouldn't be extended in the first place.

-- Steve

  reply	other threads:[~2025-05-15  9:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-13 21:45 [PATCH V4 0/6] " Prakash Sangappa
2025-05-13 21:45 ` [PATCH V4 1/6] Sched: " Prakash Sangappa
2025-05-14 10:58   ` Madadi Vineeth Reddy
2025-05-14 23:12     ` Prakash Sangappa
2025-05-15  9:01       ` Steven Rostedt [this message]
2025-05-20 16:52         ` Prakash Sangappa
2025-05-20 20:20           ` Steven Rostedt
2025-05-23 20:06   ` Mathieu Desnoyers
2025-05-23 20:34     ` Prakash Sangappa
2025-05-13 21:45 ` [PATCH V4 2/6] Sched: Indicate if thread got rescheduled Prakash Sangappa
2025-05-13 21:45 ` [PATCH V4 3/6] Sched: Tunable to specify duration of time slice extension Prakash Sangappa
2025-05-14 11:21   ` kernel test robot
2025-05-13 21:45 ` [PATCH V4 4/6] Sched: Add scheduler stat for cpu " Prakash Sangappa
2025-05-14 12:37   ` Madadi Vineeth Reddy
2025-05-14 23:01     ` Prakash Sangappa
2025-05-13 21:45 ` [PATCH V4 5/6] Sched: Add tracepoint for sched " Prakash Sangappa
2025-05-13 21:45 ` [PATCH V4 6/6] Add API to query supported rseq cs flags Prakash Sangappa
2025-05-23 19:57   ` Mathieu Desnoyers
2025-05-23 20:03     ` Prakash Sangappa
2025-05-20 21:01 ` [PATCH V4 0/6] Scheduler time slice extension Prakash Sangappa

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=20250515050159.3dbba5f5@batman.local.home \
    --to=rostedt@goodmis.org \
    --cc=bigeasy@linutronix.de \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=peterz@infradead.org \
    --cc=prakash.sangappa@oracle.com \
    --cc=tglx@linutronix.de \
    --cc=vineethr@linux.ibm.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®