apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@covalent.net>
Subject Re: freelists: a slightly different approach
Date Wed, 26 Sep 2001 19:08:27 GMT
On Wednesday 26 September 2001 11:42 am, Cliff Woolley wrote:
> On Wed, 26 Sep 2001, Ryan Bloom wrote:
> > > Will I get lynched if I further suggest putting this thing in the
> > > scoreboard?  We've got our conn_rec->id that gives us a handy lookup
> > > into the scoreboard, so it seems a logical place to put it.  Or it can
> > > just be a separate array, though the dimensions of that array will
> > > basically mirror the dimensions of the scoreboard anyway.
> >
> > Ummmmmm,  how would that work?  Will you be referencing pointers to
> > memory that isn't shared from shared memory?  That seems a bit broken
> > to me.
>
> Welllllll, yeah.  But I think I convinced myself it's a bad idea for
> performance reasons anyway.  I'm not up to speed on how the locking
> mechanisms for the scoreboard work, but it'd suck for one thread to have
> to wait around on a scoreboard lock just because of this, when by
> definition it's an unshared pointer to unshared data.  (I guess that last
> bit alone might disqualify it.)  Oh well, it wouldn't kill us to have a
> static array in each MPM that's the appropriate size and to just use that,
> indexed by the second half of AP_CHILD_THREAD_FROM_ID.  As long as they
> get stored somewhere in Apache and not in apr-util I'm happy.


There are no locks in the scoreboard at all.  Because each thread has it's
own slot in the scoreboard, and it never tries to access another thread's spot,
this is perfectly safe.

Ryan

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Mime
View raw message