On 09/27/2010 07:20 AM, Chandra Seetharaman 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. > Dear Chandra. You are an angle descended from heaven and bask us with your wisdom and kindness. The thread per target was a grate boost for the tgtd based osd-target I'm maintaining. And we were all sorry to see it go. On the other hand I was too busy with other work and did not have time to look into it. So here you came and saved me a ton of work. I tested with these patches with latest osd-target and all tests pass. Though the old set has passed as well. So my tests do not exercise these bugs. But it is good to know that nothing else broke, at-least for osd-target. I did have some merging issues with latest code. So you might want to rebase. I have a little request if you don't mind. Could you send me the scripts you used for testing, that exercise these bugs. Plus few notes on how to run, like what I need to install and so on? Also, I might want to carry them on my public git tree, is that OK? I found that finding the test that exercise the bug is usually 85% of the solution. > Please go thru them and provide me your comments. > > Thanks & Regards, > > chandra Thanks again Boaz -- 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 |