mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-12 14:29:28 +00:00
Sigh. Try to get priorities sorted out. Don't bother trying to
update native priority, it is diffcult to get right and likely to end up horribly wrong. Use an honestly wrong fixed value that seems to work; PUSER for user threads, and the interrupt priority for ithreads. Set it once when the process is created and forget about it. Suggested by: bde Pointy hat: me
This commit is contained in:
parent
f9f6bfe762
commit
5b270b2a55
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=73205
@ -306,7 +306,7 @@ proc0_init(void *dummy __unused)
|
||||
p->p_nice = NZERO;
|
||||
p->p_pri.pri_class = PRI_TIMESHARE;
|
||||
p->p_pri.pri_level = PVM;
|
||||
p->p_pri.pri_native = PRI_MAX;
|
||||
p->p_pri.pri_native = PUSER;
|
||||
p->p_pri.pri_user = PUSER;
|
||||
|
||||
p->p_peers = 0;
|
||||
|
@ -357,7 +357,6 @@ fork1(p1, flags, procp)
|
||||
|
||||
p2 = newproc;
|
||||
p2->p_intr_nesting_level = 0;
|
||||
p2->p_pri.pri_native = PRI_MAX;
|
||||
p2->p_stat = SIDL; /* protect against others */
|
||||
p2->p_pid = trypid;
|
||||
LIST_INSERT_HEAD(&allproc, p2, p_list);
|
||||
|
@ -134,6 +134,7 @@ ithread_update(struct ithd *ithd)
|
||||
|
||||
entropy = 0;
|
||||
p->p_pri.pri_level = ih->ih_pri;
|
||||
p->p_pri.pri_native = ih->ih_pri;
|
||||
TAILQ_FOREACH(ih, &ithd->it_handlers, ih_next) {
|
||||
if (strlen(p->p_comm) + strlen(ih->ih_name) + 1 <
|
||||
sizeof(p->p_comm)) {
|
||||
|
@ -426,8 +426,6 @@ _mtx_lock_sleep(struct mtx *m, int opts, const char *file, int line)
|
||||
p->p_blocked = m;
|
||||
p->p_mtxname = m->mtx_description;
|
||||
p->p_stat = SMTX;
|
||||
if (p->p_pri.pri_native == PRI_MAX)
|
||||
p->p_pri.pri_native = p->p_pri.pri_level;
|
||||
propagate_priority(p);
|
||||
|
||||
if ((opts & MTX_QUIET) == 0)
|
||||
|
@ -426,8 +426,6 @@ _mtx_lock_sleep(struct mtx *m, int opts, const char *file, int line)
|
||||
p->p_blocked = m;
|
||||
p->p_mtxname = m->mtx_description;
|
||||
p->p_stat = SMTX;
|
||||
if (p->p_pri.pri_native == PRI_MAX)
|
||||
p->p_pri.pri_native = p->p_pri.pri_level;
|
||||
propagate_priority(p);
|
||||
|
||||
if ((opts & MTX_QUIET) == 0)
|
||||
|
@ -426,8 +426,6 @@ _mtx_lock_sleep(struct mtx *m, int opts, const char *file, int line)
|
||||
p->p_blocked = m;
|
||||
p->p_mtxname = m->mtx_description;
|
||||
p->p_stat = SMTX;
|
||||
if (p->p_pri.pri_native == PRI_MAX)
|
||||
p->p_pri.pri_native = p->p_pri.pri_level;
|
||||
propagate_priority(p);
|
||||
|
||||
if ((opts & MTX_QUIET) == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user