Richard Seaman, Jr. said:
> 
> As I indicated to you several weeks ago, I think it is possible to have
> a priority inversion problem in spinlocks that spin on sched_yield.
> The yield call, as implemented, partly addresses the issue.  However,
> as you commented to me, it does so poorly.
> 
> If the consensus is to drop or modify SYS_yield, my vote would be to
> give consideration to changing the call to more correctly address the
> priority inversion issue.  Possibly a yield (pid_t pid) where the 
> pid passed in is the pid of the thread (process) holding a lock.  The
> system could then check the credentials of the pid to see if there
> is permission (eg. its a kernel thread of the same process) and if
> so, raise the priority of pid to that of the calling process for one
> time slice so pid has a chance to execute and free the lock.  
> 
I didn't add the system call to the library (yet), because wasn't sure if
it was working the way that I wanted.  I do suggest that there be only one
(yield) type system call, and if special behavior is desired, then give an
argument describing the special behavior.

I suggest that the yield that is kept should be the one where there is a
current maintainer for it :-).

-- 
John                  | Never try to teach a pig to sing,
dy...@iquest.net      | it makes one look stupid
jdy...@nc.com         | and it irritates the pig.

To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to