libpthread patch
Terry Lambert
tlambert2 at mindspring.com
Thu Apr 17 09:21:02 PDT 2003
David Xu wrote:
> > > > If it wasn't possible for the kernel to send completed
> > > > threads from one KSE to another (within the same KSE
> > > > group), we probably wouldn't need critical sections
> > > > (at least as currently implemented).
> > >
> > > Is there a particular performance/other reason this is allowed?
> >
> > I dunno. The original Jasone Evans paper didn't allow this, but
> > the Anderson SA paper did (although our version of KSE's is a bit
> > different than SA).
>
> Because there is no benefit for kernel side, whether you use one
> completed list per-ksegrp or one completed list per-upcall context,
> there is always competion between threads trying to export their
> contexts, so using one completed list is simple way to go, if we
> use completed list per-upcall context, there is other things we
> would worry about.
So dual-map the pages containing them, into both kernel and user
space, and be done with it. Add a seperate read-only mapping to
a read/write mapping, and point to one in the other, if you're
concerned about protecting some kernel data from the user space
process. This doesn't need to be so hard.
-- Terry
More information about the freebsd-threads
mailing list