[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: preemptive threads, PTH, etc

At 09:57 AM 5/26/00 -0500, Vinod Nair wrote: 
> 1. I don't believe the db2.7.7 backend is expected to be build pth-enabled,
> right ? In other words, OpenLDAP's threads will be switched by PTH based
> on calls into select/read/write, but database operations will not cause
> a thread switch. 

Right, slapd will behave like a single threaded application
in regards to database access.

> I'm seeing connect timeouts happening from other clients when a
> long-running database search is in progress, and this (main
> select loop not getting back control) might be the cause.

s/database search/LDAP operation/.  An LDAP operations might
require many database operations.  Pth can do it's magic
when the slapd does any soft-syscall (such as any I/O). 

> Since the "syscall-soft" option is used during PTH build, to map
> system calls to select/read/write to PTH schedulable equivalents,
> would it be neccessary to build db2.7.7 also to use the PTH
> mappings ?

No.  And I wouldn't.

> 2. What section of code would need to be reworked to allow "safe" use
> of pre-emptive threads for 1.2.10. Is this likely to be a major
> redesign, or some simpler changes ? 

That's question is more suitable for our developer's list.
But obviously if it was a simple change it would have been
done long ago.