[stgt] [PATCH 00/12] Fix Thread per target feature

Chandra Seetharaman sekharan at us.ibm.com
Mon Sep 27 07:20:21 CEST 2010


Hello All,

I started looking at the thread per target issue recently since Tomo
pulled it off for stability issues. When I started looking at it, Tomo
suggested that the problem could most likely be in the context of
disconnects. I started with that suggestion.

I started testing the feature with dbench's iscsi feature. I used 20
targets built on ramdisk file system and used 50 initiators from dbench. I
made the tests run for 5 seconds per iteration. Basically 50 initators
connecting to 20 targets each, run tests for 5 seconds and disconnect,
the same thing iterates forever (or till it dies :).

When I started the tests with the code that was pulled off, tgtd would
segfault and die in 3-5 minutes. Debugging more and more, I found most
 of the issues were race.

Mainly, I found 3 issues,

 - tgt_events_list (global) needed protection
 - it_nexus_list (in struct target) needed protection
 - setting of tcp_conn->pthread to 1 in iscsi_tcp_conn_nexus_init()
   need to happen before do_tgt_event_add().

In the process of understanding the patch and locating the issue, I ended
up splitting Tomo's original patches into multiple small patches by
separting the patches to incorporate simple changes each, and now have a net
of 12 patches :)

IOW, these set of patches are same as Tomo's original 3 patches except the
main 3 changes mentioned above :), (Note that there may be some simple
fixes too).

This set of patches with 1.0.8 ran the same dbench tests for over 24 hours.

Please go thru them and provide me your comments.

Thanks & Regards,

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



More information about the stgt mailing list