Clean up checking for sync logic

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/lb/trunk@10059 dc4e9af1-7f46-4ead-bba6-71afc04862de
More aggressive work stealing algorithm

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/lb/trunk@10060 dc4e9af1-7f46-4ead-bba6-71afc04862de
Fix up shutdown logic: remove shutdown message from queue, but make sure that we check the xlb_server_shutting_down variable when in sync

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/lb/trunk@10071 dc4e9af1-7f46-4ead-bba6-71afc04862de
Fix check idle corner case that may occur with faster work stealing

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/lb/trunk@10072 dc4e9af1-7f46-4ead-bba6-71afc04862de
Fix idle check bug where work that could be matched with requests
on another server.

In Swift/T usage this didn't come up in normal usage, since it happens when
This was most apparently when TURBINE_ENGINES < ADLB_SERVERS or WORKErS < ADLB_SERVERS,
but this could easily be a problem for more creative uses of ADLB.

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/lb/trunk@10073 dc4e9af1-7f46-4ead-bba6-71afc04862de
Fix backoff bug with stealing - didn't correctly backoff before.  Fix bug with check_idle due to using pointer as boolean

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/lb/trunk@10111 dc4e9af1-7f46-4ead-bba6-71afc04862de
Bump up warnings in dev mode.  Fix myriad of warnings from compiling in dev mode

Fix bug with counter not incremented.

Fix potential buffer overrun with vint decoding

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/lb/trunk@10112 dc4e9af1-7f46-4ead-bba6-71afc04862de
Keep tags around in opt mode for performance counters

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/lb/trunk@10113 dc4e9af1-7f46-4ead-bba6-71afc04862de
remove conditional compilation for message tags needed for perf counters

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/lb/trunk@10115 dc4e9af1-7f46-4ead-bba6-71afc04862de
Update loop polling algorithm with streamlined logic to reduce loop overhead.  Seems to give substantial improvement (10%+)

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/lb/trunk@10116 dc4e9af1-7f46-4ead-bba6-71afc04862de
Streamline prefer_sync check for single server case

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/lb/trunk@10117 dc4e9af1-7f46-4ead-bba6-71afc04862de
Inline put optimization for ADLB, where we include body of small
tasks in header.  This lets us eliminate a message round-trip, which
is helpful for returning quickly to the caller of ADLB_Put.  This
helps a lot when the application is bottlenecked on Turbine engines
(I measured a 33% speedup for test 589), and can help get the work
to the worker slightly faster, but doesn't impose any real overhead
in ADLB server.

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/lb/trunk@10118 dc4e9af1-7f46-4ead-bba6-71afc04862de
Use Isend/Irecv on critical path in put

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/lb/trunk@10119 dc4e9af1-7f46-4ead-bba6-71afc04862de
Store workqueue targeted work and request queue entries in array to
facilitate fast lookup on critical path.

Up to near 400000 tasks/sec on a single server

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/lb/trunk@10120 dc4e9af1-7f46-4ead-bba6-71afc04862de
Optimising request list - can spend 4-5% of time manipulating the linked lists.
Streamline list manipulation logic.
Use memory pool to avoid malloc/free on critical path.

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/lb/trunk@10123 dc4e9af1-7f46-4ead-bba6-71afc04862de
Cleanup parallel task matching logic to avoid calls on put/get path.

Only try to match on get() (when there are parallel tasks),
put() of a parallel task, or upon steal()

Up to 490k tasks/sec on my 4 core/8 hyperthread desktop.

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/lb/trunk@10125 dc4e9af1-7f46-4ead-bba6-71afc04862de
Move declaration

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/lb/trunk@10127 dc4e9af1-7f46-4ead-bba6-71afc04862de
Fix debug assert

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/lb/trunk@10128 dc4e9af1-7f46-4ead-bba6-71afc04862de
Misc cleanup of adlb changes.

Inline xlb_handle for ~1% cpu time reduction.  523k tasks/sec on my
desktop with two servers, 412k with one server.

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/lb/trunk@10129 dc4e9af1-7f46-4ead-bba6-71afc04862de
use constant instead of magic number

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/lb/trunk@10130 dc4e9af1-7f46-4ead-bba6-71afc04862de