[PATCH-v2 0/3] iscsi-target: Misc thread_set improvements + cleanups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>

Hi folks,

This -v2 is a updated set of miscellaneous improvements to iscsi-target
thread_set code to reduce latency for handling 100's of simultaneous
logins, that goes along with iscsi-target login multi-plexing logic
in-flight for v3.12-rc1.

The first patch fixes a long-standing race between rx/tx pre handlers
use of flush_signals(), and iscsi_deallocate_extra_thread_sets() setting
of ISCSI_THREAD_SET_DIE before calling kthread_stop().

The second patch removes the iscsi_thread_set->[rx,tx]_post_start_comp
in favor of a single ->ts_activate_sem in order to save extra context
switches for each iscsi_activate_thread_set() call.  It also refactors
duplicated thread_set dellocate logic into common code.

And the third patch removes an unnecessary wait_for_completion() within
iscsi_get_thread_set(), that originally would wait an extra second when
no thread_set pair was available.

Changes for v2:

  - Add explicit complete(&ts->[rx,tx]_start_comp); before kthread_stop() in
    iscsi_deallocate_extra_thread_sets()
  - Drop left-over send_sig() calls in iscsi_deallocate_extra_thread_sets()
  - Add kthread_should_stop() check in iscsi_signal_thread_pre_handler()
  - Set ISCSI_THREAD_SET_ACTIVE before calling complete in
    iscsi_activate_thread_set
  - Protect ts->conn sanity checks with ->ts_state_lock in
    RX/TX pre handlers
  - Add ->ts_activate_sem to save extra context switches per
    iscsi_activate_thread_set() call
  - Refactor thread_set shutdown into iscsi_deallocate_thread_one()

Thanks,

--nab

Nicholas Bellinger (3):
  iscsi-target: Fix race with thread_pre_handler flush_signals +
    ISCSI_THREAD_SET_DIE
  iscsi-target: Add thread_set->ts_activate_sem + use common deallocate
  iscsi-target: Remove unnecessary wait_for_completion in
    iscsi_get_thread_set

 drivers/target/iscsi/iscsi_target_tq.c |  163 +++++++++++++-------------------
 drivers/target/iscsi/iscsi_target_tq.h |    5 +-
 2 files changed, 68 insertions(+), 100 deletions(-)

-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux