20da362 Ticket #513 - recycle operation pblocks

Authored and Committed by rmeggins 11 years ago
    Ticket #513 - recycle operation pblocks
    
    https://fedorahosted.org/389/ticket/513
    Reviewed by: nhosoi,mreynolds (Thanks!)
    Branch: master
    Fix Description: Instead of doing a malloc/free of a Slapi_PBlock for every
    operation, just use a local stack variable Slapi_PBlock in each worker
    thread stack.  The only tricky thing there is that persistent search threads
    must make a copy of the pblock - they make a shallow copy, so we can't use
    slapi_pblock_init in that case, just use memset 0.  For the work_q objects,
    reuse them by storing unused ones on a PRStack to avoid malloc/free of those.
    Only malloc a new one when the stack is empty.
    Try to reuse Slapi_Operation objects as much as possible by storing unused
    ones on a PRStack - only malloc a new one when the stack is empty.
    Platforms tested: RHEL6 x86_64
    Flag Day: no
    Doc impact: Yes
    
        
file modified
+187 -109
file modified
+1 -1
file modified
+1 -0
file modified
+56 -21
file modified
+16 -10
file modified
+1 -0