• Jack Morgenstein's avatar
    net/mlx4_core: Relieve cpu load average on the port sending flow · 9f5b0317
    Jack Morgenstein authored
    When a port is not attached, the FW requires a longer than usual time to
    execute the SENSE_PORT command. In the command flow, the
    wait_for_completion_timeout call used in mlx4_cmd_wait puts the kernel
    thread into the uninterruptible state during this time. This, in turn,
    due to the computation method, causes the CPU load average to increase.
    
    Fix this by using wait_for_completion_interruptible_timeout() for the
    SENSE_PORT command, which puts the thread in the interruptible state.
    In this state, the thread does not contribute to the CPU load average.
    
    Treat the interrupted case as if the SENSE_PORT command returned
    port_type = NONE.
    
    Fix suggested by Gideon Naim <gideonn@mellanox.com> and
    Bart Van Assche <bart.vanassche@sandisk.com>.
    Signed-off-by: default avatarJack Morgenstein <jackm@dev.mellanox.co.il>
    Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9f5b0317
cmd.c 87.9 KB