Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 May 2003 14:33:39 -0400 (EDT)
From:      Jeff Roberson <jroberson@chesapeake.net>
To:        Peter Wemm <peter@wemm.org>
Cc:        Daniel Eischen <eischen@pcnet1.pcnet.com>
Subject:   Re: Question about rtld-elf. Anyone?.. Anyone? 
Message-ID:  <20030502143129.N55924-100000@mail.chesapeake.net>
In-Reply-To: <20030502002316.CB0BA2A7EA@canning.wemm.org>

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


On Thu, 1 May 2003, Peter Wemm wrote:

> Daniel Eischen wrote:
> > On Wed, 30 Apr 2003, Terry Lambert wrote:
> > > Daniel Eischen wrote:
> > > >
> > > > When it hangs, there's no windowing, so no mouse.
> > >
> > > I mean load a page which would ordinary cause it to hang, and
> > > don't move the mose at all while you wait for it to load.  No
> > > expose events means nothing else to run means effectively
> > > single threaded.
> >
> > It doesn't *get* to the point of having *any* X-window open.
> > In other words, I enter 'mozilla' at the prompt and see
> > nothing at all.  After some of my local hacks, it loads
> > 1/2 of the time and once it is loaded, it never hangs.
>
> Here's a thought.  Have a look at the _umtx_lock() and _umtx_unlock()
> syscalls that were recently added, and the corresponding scaffolding in
> libthr.  Although this would likely break libc_r, it might be worth an
> experiment to reimplement the ld-elf.so.1 spinlocks using that and see how
> it goes. In the contested case, it would tsleep() the thread rather than
> have it sit in a spinloop.  Hmm.  On second thoughts, this might not be
> so easy since it needs a thread identifier.  But have a peek anyway and
> see if there is anything to be had from there..
>
> Cheers,
> -Peter

I can't remember if we left thr_self() in the api but this call can be
made from any application.  The thread identifier is just the kva pointer
to your thread structure.  Actually, I'm almost certain that we left it
in.

umtx has one bug though, so be careful.  Right now it uses the proc lock
to protect the blocked thread queue.  If casuptr faults while the proc
lock is held we would recurse on it in the fault handler.

Cheers,
Jeff



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