• D
    IB/mlx4: Optimize do_slave_init · d9a047ae
    Doug Ledford 提交于
    There is little chance our memory allocation will fail, so we can
    combine initializing the work structs with allocating them instead of
    looping through all of them once to allocate and again to initialize.
    Then when we need to actually find out if our device is up or in the
    process of going down, have all of our work structs batched up, take the
    spin_lock once and only once, and do all of the batch under the one
    spin_lock invocation instead of incurring all of the locked memory cycles
    we would otherwise incur to take/release the spin_lock over and over
    again.
    Signed-off-by: NDoug Ledford <dledford@redhat.com>
    d9a047ae
main.c 78.6 KB