From ab13addad12036d12ab0355e635403ef3c1bafa3 Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Mon, 27 Jan 2025 11:56:12 -0500 Subject: [PATCH] Remove the unused parts of the rcache base struct Fixes #13047 Signed-off-by: George Bosilca --- opal/class/opal_interval_tree.c | 2 ++ opal/mca/rcache/base/rcache_base_vma.h | 4 +--- opal/mca/rcache/base/rcache_base_vma_tree.c | 3 +-- opal/mca/rcache/grdma/rcache_grdma_module.c | 6 ++---- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/opal/class/opal_interval_tree.c b/opal/class/opal_interval_tree.c index 15baff58e05..7b3577082c6 100644 --- a/opal/class/opal_interval_tree.c +++ b/opal/class/opal_interval_tree.c @@ -13,6 +13,7 @@ * Copyright (c) 2015-2018 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2020 Google, LLC. All rights reserved. + * Copyright (c) 2025 NVIDIA Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -85,6 +86,7 @@ static void opal_interval_tree_construct(opal_interval_tree_t *tree) tree->tree_size = 0; tree->lock = 0; tree->reader_count = 0; + tree->reader_id = 0; tree->epoch = 0; /* set all reader epochs to UINT_MAX. this value is used to simplify diff --git a/opal/mca/rcache/base/rcache_base_vma.h b/opal/mca/rcache/base/rcache_base_vma.h index c87352f2d78..a549d670ebc 100644 --- a/opal/mca/rcache/base/rcache_base_vma.h +++ b/opal/mca/rcache/base/rcache_base_vma.h @@ -15,6 +15,7 @@ * Copyright (c) 2009 IBM Corporation. All rights reserved. * Copyright (c) 2015-2018 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2025 NVIDIA Corporation. All rights reserved. * * $COPYRIGHT$ * @@ -43,9 +44,6 @@ struct mca_rcache_base_registration_t; struct mca_rcache_base_vma_module_t { opal_object_t super; opal_interval_tree_t tree; - opal_list_t vma_list; - opal_lifo_t vma_gc_lifo; - size_t reg_cur_cache_size; opal_mutex_t vma_lock; }; typedef struct mca_rcache_base_vma_module_t mca_rcache_base_vma_module_t; diff --git a/opal/mca/rcache/base/rcache_base_vma_tree.c b/opal/mca/rcache/base/rcache_base_vma_tree.c index 0883e1f3825..2dc5e0d70e8 100644 --- a/opal/mca/rcache/base/rcache_base_vma_tree.c +++ b/opal/mca/rcache/base/rcache_base_vma_tree.c @@ -14,7 +14,7 @@ * Copyright (c) 2006 Voltaire. All rights reserved. * Copyright (c) 2007 Mellanox Technologies. All rights reserved. * Copyright (c) 2009 IBM Corporation. All rights reserved. - * Copyright (c) 2013 NVIDIA Corporation. All rights reserved. + * Copyright (c) 2013-2025 NVIDIA Corporation. All rights reserved. * Copyright (c) 2013-2018 Cisco Systems, Inc. All rights reserved * Copyright (c) 2015-2018 Los Alamos National Security, LLC. All rights * reserved. @@ -34,7 +34,6 @@ int mca_rcache_base_vma_tree_init(mca_rcache_base_vma_module_t *vma_module) { OBJ_CONSTRUCT(&vma_module->tree, opal_interval_tree_t); - vma_module->reg_cur_cache_size = 0; return opal_interval_tree_init(&vma_module->tree); } diff --git a/opal/mca/rcache/grdma/rcache_grdma_module.c b/opal/mca/rcache/grdma/rcache_grdma_module.c index 9506b9d72c3..e8177f21b1e 100644 --- a/opal/mca/rcache/grdma/rcache_grdma_module.c +++ b/opal/mca/rcache/grdma/rcache_grdma_module.c @@ -16,7 +16,7 @@ * Copyright (c) 2010 IBM Corporation. All rights reserved. * Copyright (c) 2011-2018 Los Alamos National Security, LLC. All rights * reserved. - * Copyright (c) 2013 NVIDIA Corporation. All rights reserved. + * Copyright (c) 2013-2025 NVIDIA Corporation. All rights reserved. * Copyright (c) 2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2020 Google, LLC. All rights reserved. @@ -75,12 +75,10 @@ static inline bool registration_is_cacheable(mca_rcache_base_registration_t *reg static void mca_rcache_grdma_cache_contructor(mca_rcache_grdma_cache_t *cache) { - memset((void *) ((uintptr_t) cache + sizeof(cache->super)), 0, - sizeof(*cache) - sizeof(cache->super)); - OBJ_CONSTRUCT(&cache->lru_list, opal_list_t); OBJ_CONSTRUCT(&cache->gc_lifo, opal_lifo_t); + cache->cache_name = NULL; cache->vma_module = mca_rcache_base_vma_module_alloc(); }