• farah kassabri's avatar
    accel/habanalabs: optimize timestamp registration handler · 1157b5d6
    farah kassabri authored
    Currently we use dynamic allocation inside the irq handler
    in order to allocate free node to be used for the free jobs.
    
    This operation is expensive, especially when we deal with large
    burst of events records that get released at the same time.
    
    The alternative is to have pre allocated pool of free nodes
    and just fetch nodes from this pool at irq handling time instead
    of allocating them.
    
    In case the pool becomes full, then the driver will fallback to
    dynamic allocations.
    
    As part of the optimization also update the unregister flow
    upon re-using a timestamp record, by making the operation much
    simpler and quicker. We already have the record in the registration
    flow and now we just seek to re-use with different interrupt.
    Therefore, no need to look for buffer according to the user handle.
    Signed-off-by: default avatarfarah kassabri <fkassabri@habana.ai>
    Reviewed-by: default avatarTomer Tayar <ttayar@habana.ai>
    Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
    1157b5d6
command_submission.c 101 KB