From e10ad5763f5a18be47c09115d4a1879d9b284fe7 Mon Sep 17 00:00:00 2001 From: Dave Goodell Date: Wed, 26 Feb 2014 07:40:53 +0000 Subject: [PATCH] usnic: rearrange component struct field order Just trying to be deliberate about keeping fastpath-accessed fields grouped together to fit into the same 64-byte cache line. Reviewed-by: Jeff Squyres cmr=v1.7.5:ticket=trac:4253 This commit was SVN r30837. The following Trac tickets were found above: Ticket 4253 --> https://svn.open-mpi.org/trac/ompi/ticket/4253 --- ompi/mca/btl/usnic/btl_usnic.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/ompi/mca/btl/usnic/btl_usnic.h b/ompi/mca/btl/usnic/btl_usnic.h index 84f463e5d6..aab0bf4636 100644 --- a/ompi/mca/btl/usnic/btl_usnic.h +++ b/ompi/mca/btl/usnic/btl_usnic.h @@ -125,16 +125,14 @@ typedef struct ompi_btl_usnic_component_t { /** base BTL component */ mca_btl_base_component_2_0_0_t super; + /* in the v1.6 series, sizeof(super) is 256, leading to good alignment for + * subsequent fastpath fields */ + /** Maximum number of BTL modules */ uint32_t max_modules; /** Number of available/initialized BTL modules */ uint32_t num_modules; - char *if_include; - char *if_exclude; - char *vendor_part_ids_string; - uint32_t *vendor_part_ids; - /* Cached hashed version of my RTE proc name (to stuff in protocol headers) */ uint64_t my_hashed_rte_name; @@ -144,12 +142,22 @@ typedef struct ompi_btl_usnic_component_t { /** array of pointers to active BTLs (num_modules elements) */ struct ompi_btl_usnic_module_t** usnic_active_modules; + /** convertor packing threshold */ + int pack_lazy_threshold; + + /* vvvvvvvvvv non-fastpath fields go below vvvvvvvvvv */ + /** list of usnic proc structures */ opal_list_t usnic_procs; /** name of memory pool */ char* usnic_mpool_name; + char *if_include; + char *if_exclude; + char *vendor_part_ids_string; + uint32_t *vendor_part_ids; + /** Want stats? */ bool stats_enabled; bool stats_relative; @@ -177,9 +185,6 @@ typedef struct ompi_btl_usnic_component_t { /** retrans characteristics */ int retrans_timeout; - - /** convertor packing threshold */ - int pack_lazy_threshold; } ompi_btl_usnic_component_t; OMPI_MODULE_DECLSPEC extern ompi_btl_usnic_component_t mca_btl_usnic_component;