> > There's not too many StgMainThreads around, so why do
> > you think there's a perf win (at the cost of adding another
> > word to every TSO)?
>
> When implementing my bound threads proposal, I'd have to query the
> MainThread for every TSO that is scheduled.
> How many is "not too many"? There is one for each call-in to the RTS,
> couldn't that become a problem? I'm just afraid of doing a
> linear scan
> each time.
>
> But no, I'm not absolutely convinced, and I can just do my
> linear scans
> for now. If it's indeed a performance problem, we'll find out soon
> enough.
The alternative which I considered is to hash the thread id to the
StgMainThread*. But on balance, adding one word to the TSO structure is
simpler and won't make a noticeable difference to performance: TSOs are
usually a minimum 1k anwyay, and we always copy the whole lot during GC
(we shouldn't - I must get around to optimising that sometime). TSOs
bigger than about 3k are treated as large objects and not copied.
Cheers,
Simon
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|