• Xiao Ni's avatar
    md: Change active_io to percpu · 72adae23
    Xiao Ni authored
    Now the type of active_io is atomic. It's used to count how many ios are
    in the submitting process and it's added and decreased very time. But it
    only needs to check if it's zero when suspending the raid. So we can
    switch atomic to percpu to improve the performance.
    
    After switching active_io to percpu type, we use the state of active_io
    to judge if the raid device is suspended. And we don't need to wake up
    ->sb_wait in md_handle_request anymore. It's done in the callback function
    which is registered when initing active_io. The argument mddev->suspended
    is only used to count how many users are trying to set raid to suspend
    state.
    Signed-off-by: default avatarXiao Ni <xni@redhat.com>
    Signed-off-by: default avatarSong Liu <song@kernel.org>
    72adae23
md.h 28.4 KB