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

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Mon Sep 27 08:24:41 CEST 2010


On Sun, 26 Sep 2010 22:20:21 -0700
Chandra Seetharaman <sekharan at us.ibm.com> wrote:

> 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.

Sounds promising! Thanks a lot!

I am at Linux.con Japan conference until Wed so probably I can't
review this for a while. But I'll review this after that.

Can anyone test the patchset meanwhile?

btw, the first patch can't be applied to the current git cleanly. The
second patch can't too.
--
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