Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ch4/ipc: refactor IPC and add CMA module #6579

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Commits on Jul 3, 2023

  1. ch4/ipc: remove threshold from MPIDI_IPCI_ipc_attr

    The _get_ipc_attr functions should check the threshold and set ipc_type
    to MPIDI_IPCI_TYPE__NONE if it doesn't meet threshold. Thus, there is no
    need to return the threshold to the caller.
    
    Not exposing threshold allows more sophiscated threshold checking if needed.
    
    Slight refactor to streamline the do_ipc check.
    hzhou committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    3bc338a View commit details
    Browse the repository at this point in the history
  2. ch4/shm: clean up MPIDI_SHM_REQUEST_AM_DECL

    We no longer use the status and the ipc fields. Remove.
    hzhou committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    c7a9462 View commit details
    Browse the repository at this point in the history
  3. ch4/ipc/gpu: move gavl tree creation to gpu_post.c

    Move relevant code together.
    hzhou committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    b56797a View commit details
    Browse the repository at this point in the history
  4. ch4/ipc/gpu: check MPIR_CVAR_CH4_IPC_GPU_HANDLE_CACHE at caller

    Check MPIR_CVAR_CH4_IPC_GPU_HANDLE_CACHE at the caller place rather than
    inside ipc_handle_cache_search and MPIDI_GPU_ipc_handle_cache_insert.
    This keeps the search and insert utility functions simple, and avoids
    the extra insert_successful check.
    
    Also, move MPIDI_GPU_ipc_handle_cache_insert into the branch to avoid
    extra checking and setting handle_status.
    hzhou committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    c60e189 View commit details
    Browse the repository at this point in the history
  5. ch4/ipc/gpu: refactor ipc_handle_track_trees utils

    Store MPL_gpu_ipc_mem_handle_t directly rather than
    MPIDI_IPCI_ipc_handle_t. Add separate utilities to avoid mixing
    different requirement of caching local ipc handles versus caching remote
    mapped addresses.
    hzhou committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    27b554a View commit details
    Browse the repository at this point in the history
  6. ch4/ipc/gpu: refactor ipc_handle_mapped_trees utils

    Directly cache mapped_base_addr.
    hzhou committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    756cf5f View commit details
    Browse the repository at this point in the history
  7. ch4/ipc/gpu: refactor MPIDI_GPU_copy_data

    Refactor and move the code into MPIDI_GPU_copy_data. The gpu related
    code belongs in gpu_post.c.
    hzhou committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    4cd7b89 View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2023

  1. ch4/ipc: refactor ipc query and handle preparation

    Make ipc attr query and ipc handle preparation orthogonal and use
    separate data structure to avoid complication. In attr query, we focus
    on whether we should enable IPC, and only cache necessary information
    locally that is sufficient for preparing the handle. All the actual
    handle preparation logic moved to the separate function later.
    
    Different IPC features have different logic. Move most of the special
    data structure and logic inside the feature code to avoid changes in one
    feature affecting the code in other features.
    
    ch4/ipc: refactor fixup
    hzhou committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    4ff0230 View commit details
    Browse the repository at this point in the history
  2. ch4/ipc: contain XPMEM/GPU code inside macro guard

    This is cleaner.
    hzhou committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    27fb5a4 View commit details
    Browse the repository at this point in the history
  3. ch4/shm: add ipc cma

    hzhou committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    db5e3f7 View commit details
    Browse the repository at this point in the history
  4. ch4/ipc: remove xpmem_stub.c

    The xpmem functions are now always guarded by #ifdef
    MPIDI_CH4_SHM_ENABLE_XPMEM.
    hzhou committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    155029a View commit details
    Browse the repository at this point in the history