Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162204294
D58065.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D58065.diff
View Options
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -114,7 +114,7 @@
#define TSF_AFFINITY 0x0001 /* Has a non-"full" CPU set. */
#define SKE_RUNQ_PCPU(ts) \
- ((ts)->ts_runq != 0 && (ts)->ts_runq != &runq)
+ ((ts)->ts_runq != 0 && (ts)->ts_runq != &runq_global)
#define THREAD_CAN_SCHED(td, cpu) \
CPU_ISSET((cpu), &(td)->td_cpuset->cs_mask)
@@ -158,7 +158,7 @@
/*
* Global run queue.
*/
-static struct runq runq;
+static struct runq runq_global;
#ifdef SMP
/*
@@ -186,7 +186,7 @@
runq_init(&runq_pcpu[i]);
#endif
- runq_init(&runq);
+ runq_init(&runq_global);
}
static int
@@ -684,10 +684,10 @@
sched_4bsd_runnable(void)
{
#ifdef SMP
- return (runq_not_empty(&runq) ||
+ return (runq_not_empty(&runq_global) ||
runq_not_empty(&runq_pcpu[PCPU_GET(cpuid)]));
#else
- return (runq_not_empty(&runq));
+ return (runq_not_empty(&runq_global));
#endif
}
@@ -1374,7 +1374,7 @@
"sched_add: adding td_sched:%p (td:%p) to gbl runq", ts,
td);
cpu = NOCPU;
- ts->ts_runq = &runq;
+ ts->ts_runq = &runq_global;
}
if ((td->td_flags & TDF_NOLOAD) == 0)
@@ -1439,7 +1439,7 @@
}
TD_SET_RUNQ(td);
CTR2(KTR_RUNQ, "sched_add: adding td_sched:%p (td:%p) to runq", ts, td);
- ts->ts_runq = &runq;
+ ts->ts_runq = &runq_global;
if ((td->td_flags & TDF_NOLOAD) == 0)
sched_load_add();
@@ -1470,7 +1470,7 @@
if ((td->td_flags & TDF_NOLOAD) == 0)
sched_load_rem();
#ifdef SMP
- if (ts->ts_runq != &runq)
+ if (ts->ts_runq != &runq_global)
runq_length[ts->ts_runq - runq_pcpu]--;
#endif
runq_remove(ts->ts_runq, td);
@@ -1485,14 +1485,14 @@
sched_4bsd_choose(void)
{
struct thread *td;
- struct runq *rq;
+ struct runq *runq;
mtx_assert(&sched_lock, MA_OWNED);
#ifdef SMP
struct thread *tdcpu;
- rq = &runq;
- td = runq_choose_fuzz(&runq, runq_fuzz);
+ runq = &runq_global;
+ td = runq_choose_fuzz(&runq_global, runq_fuzz);
tdcpu = runq_choose(&runq_pcpu[PCPU_GET(cpuid)]);
if (td == NULL ||
@@ -1501,14 +1501,14 @@
CTR2(KTR_RUNQ, "choosing td %p from pcpu runq %d", tdcpu,
PCPU_GET(cpuid));
td = tdcpu;
- rq = &runq_pcpu[PCPU_GET(cpuid)];
+ runq = &runq_pcpu[PCPU_GET(cpuid)];
} else {
CTR1(KTR_RUNQ, "choosing td_sched %p from main runq", td);
}
#else
- rq = &runq;
- td = runq_choose(&runq);
+ runq = &runq_global;
+ td = runq_choose(&runq_global);
#endif
if (td) {
@@ -1516,7 +1516,7 @@
if (td == tdcpu)
runq_length[PCPU_GET(cpuid)]--;
#endif
- runq_remove(rq, td);
+ runq_remove(runq, td);
td->td_flags |= TDF_DIDRUN;
KASSERT(td->td_flags & TDF_INMEM,
@@ -1798,7 +1798,7 @@
* If we are on a per-CPU runqueue that is in the set,
* then nothing needs to be done.
*/
- if (ts->ts_runq != &runq &&
+ if (ts->ts_runq != &runq_global &&
THREAD_CAN_SCHED(td, ts->ts_runq - runq_pcpu))
return;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 11, 9:12 PM (4 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34815663
Default Alt Text
D58065.diff (2 KB)
Attached To
Mode
D58065: sched_4bsd: rename runq to runq_global
Attached
Detach File
Event Timeline
Log In to Comment