KSE/ia64 & thr_spinlock.c:1.18: problem identified
Marcel Moolenaar
marcel at xcllnt.net
Thu Nov 27 11:03:39 PST 2003
On Thu, Nov 27, 2003 at 10:07:25AM -0500, Daniel Eischen wrote:
> On Wed, 26 Nov 2003, Marcel Moolenaar wrote:
>
> > Ok,
> >
> > I found what the problem is. Syscalls that got interrupted were not
> > restarted when they should be. This is the result of using the KSE
> > internal context functions, when we should be going through the
> > kernel. So, the end result is that we do in fact need a syscall to
> > switch KSE contexts. Attached a patch to add such syscall. Please
> > review (ia64 specific changes to make use of the syscall are not
> > included).
>
> The patch looks OK. Is it possible to roll _ia64_break_setcontext()
> into kse_switchin() and have ia64's set_mcontext() know the difference
> between the two contexts?
I'm working on it. I had this done right from the start after creating
the syscall, but it reintroduced old failures related to asynchronous
contexts. So, my working version now has 3 ways to restore a context
(_ia64_break_setcontext(), _ia64_restore_context() and kse_switchin())
and it demonstrates that the problem was indeed that we were using
_ia64_restore_context() in cases where this would be invalid.
So yes, the next step is to remove the ia64_break_setcontext() hack
and use kse_switchin() for asynchronous contexts as well.
--
Marcel Moolenaar USPA: A-39004 marcel at xcllnt.net
More information about the freebsd-threads
mailing list