Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zfs_vdev_parallel_open_enabled module parameter #5286

Closed
wants to merge 1 commit into from

Conversation

ryao
Copy link
Contributor

@ryao ryao commented Oct 16, 2016

Parallel vdev open causes the driver to deadlock when running ZFS on top
of a zvol with something in between, including, but not limited to the
loop device. Such configurations are unsupported because we do not have
regression test coverage for them, but enough people have requested the
capability over the years that we ought to give them a knob to make the
configuration work in most instances.

Signed-off-by: Richard Yao ryao@gentoo.org

@mention-bot
Copy link

@ryao, thanks for your PR! By analyzing the history of the files in this pull request, we identified @lundman, @behlendorf and @FransUrbo to be potential reviewers.

@ryao
Copy link
Contributor Author

ryao commented Oct 16, 2016

@behlendorf Nice bot. :)

@ryao ryao force-pushed the parallel_vdev branch 3 times, most recently from 1f0c412 to 711fdc4 Compare October 16, 2016 18:30
Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank's @ryao. We're trying out the mention bot, so far it's working pretty well. As for this patch just two changes requested.

@@ -250,6 +250,25 @@ Use \fB1\fR for yes (default) and \fB0\fR for no.
.sp
.ne 2
.na
\fBparallel_vdev_open\fR (bool)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with the other options how about we call this zfs_vdev_parallel_open_enabled.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating the name, but it looks like you overlooked updating the man page.

@@ -3642,6 +3647,10 @@ EXPORT_SYMBOL(vdev_online);
EXPORT_SYMBOL(vdev_offline);
EXPORT_SYMBOL(vdev_clear);

module_param(parallel_vdev_open, bool, 0644);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be an int not a bool to resolve the build failure.

Accelerates vdev open from pool import or reopen from reload from cache by
allow child vdevs to be opened in parallel.
.sp
This almost always deadlocks in unsupported ZFS sandwich configurations where a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the term "stacked" is more appropriate than "sandwich" here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing.

@ryao ryao force-pushed the parallel_vdev branch 5 times, most recently from 7bfb700 to de61921 Compare October 17, 2016 17:33
@ryao
Copy link
Contributor Author

ryao commented Oct 17, 2016

@behlendorf I think I got all of the typos out of the man page this time. :)

behlendorf
behlendorf previously approved these changes Oct 17, 2016
@ryao ryao changed the title Add parallel_vdev_open module parameter Add zfs_vdev_parallel_open_enabled module parameter Oct 17, 2016
@behlendorf
Copy link
Contributor

It occurs to me that in theory we could use this option to enable all the nested zpool tests in the test suite.

@ryao ryao force-pushed the parallel_vdev branch 2 times, most recently from 172ff9a to d4b202e Compare October 17, 2016 17:55
@ryao
Copy link
Contributor Author

ryao commented Oct 17, 2016

@behlendorf I reactivated the nested pool tests and modified them to turn parallel import off just for Linux.

Parallel vdev open causes the driver to deadlock when running ZFS on top
of a zvol with something in between, including, but not limited to the
loop device. Such configurations are historically unsupported. However,
enough people have requested the capability over the years that we ought
to give them a knob to make the configuration work in most instances. We
have tests for the direct case, but the indirect case continues to be
unsupported.

Signed-off-by: Richard Yao <ryao@gentoo.org>
@behlendorf
Copy link
Contributor

@ryao thanks, although we probably want to enable the tests in a separate PR. That way we won't need to work through fixing every test failure we see before merging this. It will be nice to get a test run though to see how many of theses tests pass.


if is_linux; then
echo 1 > /sys/module/zfs/parameters/zfs_vdev_parallel_open_enabled
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a helper function for this in tests/zfs-tests/include/libtest.shlib would be in order. That way we can keep this is_linux code out of the test cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, although I'll wait for the buildbot to finish before changing this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best to do it in a new PR too and remove those changes from this PR. Then I'll be able to merge this.

Copy link
Contributor Author

@ryao ryao Oct 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the zfs test suite passes? I have my fingers crossed. :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No such luck. Boom!

@behlendorf behlendorf added the Status: Work in Progress Not yet ready for general review label Oct 24, 2016
@behlendorf
Copy link
Contributor

@ryao the original fix here is good, but it can't be merged while it contains all the modification to the test suite which cause test failures. Can you drop the test suite modifications from this patch.

@behlendorf behlendorf dismissed their stale review December 1, 2016 23:51

Changes are needed prior to merging.

Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to the test suite needed to be removed so this patch passes the automated testing.

@behlendorf
Copy link
Contributor

@ryao I'm closing this for now. When you get a chance to work on this again go ahead and open a new PR which addresses the comments above.

@behlendorf behlendorf closed this Jan 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Work in Progress Not yet ready for general review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants