Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Nov 2002 10:56:43 -0500 (EST)
From:      Daniel Eischen <eischen@pcnet1.pcnet.com>
To:        Doug Rabson <dfr@nlsystems.com>
Cc:        Alfred Perlstein <bright@mu.org>, Marcel Moolenaar <marcel@xcllnt.net>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/lib/libc_r/arch/ia64 _atomic_lock.S
Message-ID:  <Pine.GSO.4.10.10211171051480.16958-100000@pcnet1.pcnet.com>
In-Reply-To: <200211171401.02376.dfr@nlsystems.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sun, 17 Nov 2002, Doug Rabson wrote:

> On Sunday 17 November 2002 1:13 pm, Alfred Perlstein wrote:
> > * Doug Rabson <dfr@nlsystems.com> [021117 02:25] wrote:
> > > On Saturday 16 November 2002 7:58 pm, Marcel Moolenaar wrote:
> > > > On Sat, Nov 16, 2002 at 02:13:19PM -0500, Daniel Eischen wrote:
> > > > > On Sat, 16 Nov 2002, Marcel Moolenaar wrote:
> > > > > > If you want me to send patches, let me know. I'm trying to
> > > > > > figure out what to do now that the *context functions have
> > > > > > been turned into syscalls. It complicates things...
> > > > >
> > > > > I'm working on converting libc_r to use *context() so don't
> > > > > worry about doing it yourself.
> > > >
> > > > Cool!
> > > >
> > > > I hope to have the *context syscalls next week. I've decided to
> > > > not attack the problem head on, because we don't have time to
> > > > fix the infrastructure for it (we need to unwind to recreate the
> > > > context). Instead, I hope to hack-up a workable solution from an
> > > > ABI breaking change. The ABI breaker allows us to have
> > > > lightweight syscalls, which we permanently want. So, doing that
> > > > now is very attractive. The intend is to implement the *context
> > > > syscalls as lightweight syscalls in a very hackish way. This
> > > > serves as an experiment as well as solving an immediate problem.
> > > > Let's hope it works out...
> > >
> > > So you intend to recognise the context calls in the syscall wrapper
> > > and special-case them? This would work but it would also work for
> > > heavyweight syscalls. I'm still worried about how you are going to
> > > flush the user's register stack safely from kernel mode.
> >
> > I'm probably being dense, but doesn't the ABI specify behaviour
> > such that one may not use stack space past the frame pointer
> > (equivelant of ebp on i386) so this should be doable, right?
> >
> > Basically, as long as the frame pointer is moved before the
> > space is used it's safe, right?
> 
> This is a bit different - I'm talking about the ia64's register stack, 
> as distinct from its normal stack. When switching from one thread to 
> another, you must flush any dirty registers into the old thread's 
> register stack backing memory. Doing this from kernel mode can be 
> tricky since the pages of backing memory might not be valid yet.

Just curious, how do you intend to work this into things
for which the specs allow one stack?  pthread_attr_setstackaddr,
pthread_attr_setstacksize, makecontext, etc.

Do the stacks grow in different directions so that you could
use one chunk of memory with one stack starting at the top
and the other at the bottom, so they would grow towards
each other (perhaps with a guard page in between)?

-- 
Dan Eischen


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10211171051480.16958-100000>