All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] fix incorrect comment in kernel/sched/rt.c
@ 2020-11-10 19:12 Sidney Cammeresi
  2020-11-10 19:12 ` [PATCH] sched/rt: fix incorrect comment about non-migratable tasks' priority Sidney Cammeresi
  0 siblings, 1 reply; 2+ messages in thread
From: Sidney Cammeresi @ 2020-11-10 19:12 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-kernel

I was reading rt.c and was looking at the code pertaining to allowing a
non-migratable task to preempt a migratable task of the same priority.
It appears to me that one of the comments describing when this will
happen is wrong.

It appears that preemption will only happen when the task is *not* about
to be otherwise preempted.  The comment appears to describe an older
version of the code, in which preemption would happen when the task *was*
about to be preempted, the opposite condition.

Sidney Cammeresi (1):
  sched/rt: fix incorrect comment about non-migratable tasks' priority

 kernel/sched/rt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.7.4


-- 
Sidney Cammeresi
Staff Software Engineer, MariaDB Corporation Ab

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] sched/rt: fix incorrect comment about non-migratable tasks' priority
  2020-11-10 19:12 [PATCH 0/1] fix incorrect comment in kernel/sched/rt.c Sidney Cammeresi
@ 2020-11-10 19:12 ` Sidney Cammeresi
  0 siblings, 0 replies; 2+ messages in thread
From: Sidney Cammeresi @ 2020-11-10 19:12 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-kernel

Signed-off-by: Sidney Cammeresi <sac@mariadb.com>
---
 kernel/sched/rt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 49ec096..6197c9e 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -1560,7 +1560,7 @@ static void check_preempt_curr_rt(struct rq *rq, struct task_struct *p, int flag
 	 *
 	 * - the newly woken task is of equal priority to the current task
 	 * - the newly woken task is non-migratable while current is migratable
-	 * - current will be preempted on the next reschedule
+	 * - current will not be preempted on the next reschedule
 	 *
 	 * we should check to see if current can readily move to a different
 	 * cpu.  If so, we will reschedule to allow the push logic to try
-- 
2.7.4


-- 
Sidney Cammeresi
Staff Software Engineer, MariaDB Corporation Ab

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-10 19:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10 19:12 [PATCH 0/1] fix incorrect comment in kernel/sched/rt.c Sidney Cammeresi
2020-11-10 19:12 ` [PATCH] sched/rt: fix incorrect comment about non-migratable tasks' priority Sidney Cammeresi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.