Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jan 2002 01:19:53 -0800
From:      Peter Wemm <peter@wemm.org>
To:        Alfred Perlstein <bright@mu.org>
Cc:        Nate Williams <nate@yogotech.com>, Dan Eischen <eischen@vigrid.com>, Archie Cobbs <archie@dellroad.org>, arch@FreeBSD.ORG
Subject:   Re: Request for review: getcontext, setcontext, etc 
Message-ID:  <20020110091953.B904539F0@overcee.netplex.com.au>
In-Reply-To: <20020107195545.I18706@elvis.mu.org> 

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

Alfred Perlstein wrote:
> * Nate Williams <nate@yogotech.com> [020107 19:02] wrote:
> > > > > threads.
> > > > > 
> > > > > Is this possible?
> > > > 
> > > > In the future it may be possible, if we keep track of FP-usage on a
> > > > thread basis instead of a process basis.  This requires kernel threads.
> > > 
> > > No, as I stated above, I don't think this requires kernel threads.
> > 
> > I understand now, thanks.  However, I'm not sure how easily this can be
> > done.
> 
> All you need is a hook to reset the FP-used bit, any application
> that clears the bit incorrectly gets what it deserves. :)

IA64 has two "fp used" bits that are user visible.  One is for the low 32
128-bit FP registers, the other is for the other 96 128-bit registers. The
user can clear these when it decides that it has nothing worth preserving
in those registers and then the kernel stops saving/restoring them.

This is exactly the kind of thing we need for the i386, except it doesn't
exist.  The only knowledge about who has FPU state is fpcurproc in the
kernel, and even then there is no way for a userland process/whatever to
tell the system to discard its fp register context.

Cheers,
-Peter
--
Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
"All of this is for nothing if we don't go to the stars" - JMS/B5


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




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