diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2020-01-30 08:51:28 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2020-01-30 08:51:28 +0000 |
commit | 96ee2a5e760d7ceead850ce405dafe725eef12be (patch) | |
tree | eb01d054c7b24653631e51c9d0f072cced13c983 /sys/dev/pci/drm/i915 | |
parent | ed89ebd6ca2e1f64a4a94830103b0aee51ed140b (diff) |
Split `p_priority' into `p_runpri' and `p_slppri'.
Using different fields to remember in which runqueue or sleepqueue
threads currently are will make it easier to split the SCHED_LOCK().
With this change, the (potentially boosted) sleeping priority is no
longer overwriting the thread priority. This let us get rids of the
logic required to synchronize `p_priority' with `p_usrpri'.
Tested by many, ok visa@
Diffstat (limited to 'sys/dev/pci/drm/i915')
-rw-r--r-- | sys/dev/pci/drm/i915/intel_breadcrumbs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/drm/i915/intel_breadcrumbs.c b/sys/dev/pci/drm/i915/intel_breadcrumbs.c index 0ed0ab35d9a..ee379dfe847 100644 --- a/sys/dev/pci/drm/i915/intel_breadcrumbs.c +++ b/sys/dev/pci/drm/i915/intel_breadcrumbs.c @@ -451,7 +451,7 @@ static bool __intel_engine_add_wait(struct intel_engine_cs *engine, #ifdef __linux__ if (wait->tsk->prio > to_wait(parent)->tsk->prio) { #else - if (wait->tsk->p_priority > to_wait(parent)->tsk->p_priority) { + if (wait->tsk->p_usrpri > to_wait(parent)->tsk->p_usrpri) { #endif p = &parent->rb_right; first = false; @@ -538,7 +538,7 @@ static inline bool chain_wakeup(struct rb_node *rb, int priority) #else static inline bool chain_wakeup(struct rb_node *rb, int priority) { - return rb && to_wait(rb)->tsk->p_priority <= priority; + return rb && to_wait(rb)->tsk->p_usrpri <= priority; } #endif @@ -558,7 +558,7 @@ static inline int wakeup_priority(struct intel_breadcrumbs *b, if (p == b->signaler) return INT_MIN; else - return p->p_priority; + return p->p_usrpri; } #endif |