From 90fc0c5cc76dba421ba4c1fada6ca86f0a62f7d9 Mon Sep 17 00:00:00 2001 From: Gleb Natapov Date: Thu, 20 Jul 2006 14:01:57 +0000 Subject: [PATCH] don't lookup registration in the empty cache. This commit was SVN r10897. --- ompi/mca/rcache/rb/rcache_rb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ompi/mca/rcache/rb/rcache_rb.c b/ompi/mca/rcache/rb/rcache_rb.c index d92c21efe0..ae7d4d07d2 100644 --- a/ompi/mca/rcache/rb/rcache_rb.c +++ b/ompi/mca/rcache/rb/rcache_rb.c @@ -58,7 +58,12 @@ int mca_rcache_rb_find ( } OPAL_THREAD_LOCK(&rcache->lock); *cnt = 0; - + + if(ompi_rb_tree_size(&((mca_rcache_rb_module_t*)rcache)->rb_tree) == 0) { + OPAL_THREAD_UNLOCK(&rcache->lock); + return OMPI_SUCCESS; + } + base_addr = down_align_addr(addr, mca_mpool_base_page_size_log); bound_addr = up_align_addr((void*) ((unsigned long) addr + size - 1), mca_mpool_base_page_size_log);