Dead code elimination and fix bufmgr_fake_wait_idle.