Description of problem: rgmanager has rg_lock() and rg_unlock(). These are artifacts from clumanager, and aren't needed because the data replication subsystem is both thread-locked and cluster-locked. rg_lock() and rg_unlock() just slow things down. Running with them defined to no-op functions returning 0 is a huge performance gain.
Reducing them all to no-ops is a bad idea; it opens potential TOCTOU problems. They should be evaulated on a case-by-case basis.
Generally, when a node only needs to read the service data to make some decision -- but not updating it, it can safely just call get_rg_state without calling rg_lock/rg_unlock. This would significantly improve performance during node transitions when we are evaluating resource groups.