lkml.org 
[lkml]   [2004]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectLikelihood of rt_tasks
A quick question about the usefulness of making rt_task() checks 
unlikely in sched-unlikely-rt_task.patch which is in -mm

quote:

diff -puN include/linux/sched.h~sched-unlikely-rt_task include/linux/sched.h
--- 25/include/linux/sched.h~sched-unlikely-rt_task Fri Jul 2 16:33:01 2004
+++ 25-akpm/include/linux/sched.h Fri Jul 2 16:33:01 2004
@@ -300,7 +300,7 @@ struct signal_struct {

#define MAX_PRIO (MAX_RT_PRIO + 40)

-#define rt_task(p) ((p)->prio < MAX_RT_PRIO)
+#define rt_task(p) (unlikely((p)->prio < MAX_RT_PRIO))

/*
* Some day this will be a full-fledged user tracking system..
---
While rt tasks are normally unlikely, what happens in the case when you
are scheduling one or many running rt_tasks and the majority of your
scheduling is rt? Would it be such a good idea in this setting that it
is always hitting the slow path of branching all the time?
Con
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.121 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site