Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Nov 2003 11:03:37 -0800
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        deischen@freebsd.org
Cc:        threads@freebsd.org
Subject:   Re: KSE/ia64 & thr_spinlock.c:1.18: problem identified
Message-ID:  <20031127190337.GB14849@dhcp01.pn.xcllnt.net>
In-Reply-To: <Pine.GSO.4.10.10311271004350.16129-100000@pcnet5.pcnet.com>
References:  <20031127055545.GB12712@dhcp01.pn.xcllnt.net> <Pine.GSO.4.10.10311271004350.16129-100000@pcnet5.pcnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@xcllnt.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031127190337.GB14849>