-
Notifications
You must be signed in to change notification settings - Fork 1.8k
zvol: Enable zvol threading functionality on FreeBSD #17169
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am happy to see somebody working on unifying this code. But see some comments inline:
f6c23e2
to
fca8f33
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found 4 ways to call zvol, and decided to use next sync/async switching logic dependent of volmode parameter:
geom:
- (1) zvol_geom_bio_start() - sync
- (2) zvol_geom_worker() - async
cdev:
- (3) zvol_cdev_read()/_write() - sync
- (4) zvol_geom_bio_strategy() - async
(1) - the way dependent from geom thread stack usage, case when direct=1.
(2) - case when direct variable value become zero. The direct value is not depend from sync or aio usage.
(3) - normal usage in cdev mode, example: fio with engine=sync.
(4) - used in case of AIO, example: fio with engine=posixaio
Aside of stack usage, some GEOM classes may be unable to use direct I/O due to locking constraints and have to switch into GEOM up/down threads. |
7d474c6
to
0d12476
Compare
@fuporovvStack can you rebase on the latest master so you pull in d947b9a? |
2b799e1
to
ec70a51
Compare
550f95f
to
b620d61
Compare
Make zvol I/O requests processing asynchronous on FreeBSD side in some cases. Clone zvol threading logic and required module parameters from Linux side. Make zvol threadpool creation/destruction logic shared for both Linux and FreeBSD. The IO requests are processed asynchronously in next cases: - volmode=geom: if IO request thread is geom thread or cannot sleep. - volmode=cdev: if IO request passed thru struct cdevsw .d_strategy routine, mean is AIO request. In all other cases the IO requests are processed synchronously. The volthreading zvol property is ignored on FreeBSD side. Sponsored-by: vStack, Inc. Signed-off-by: Fedor Uporov <[email protected]>
Motivation and Context
Add zvol IO taskqs support on FreeBSD side. Make zvol threadpool creation/destruction logic and zvol module parameters shared for both Linux and FreeBSD.
Description
Make zvol I/O requests processing asynchronous on FreeBSD side in some cases. Clone zvol threading logic and required module parameters from Linux side. Make zvol threadpool creation/destruction logic shared for both Linux and FreeBSD.
The IO requests are processed asynchronously in next cases:
In all other cases the IO requests are processed synchronously.
How Has This Been Tested?
The zvol_request_sync module parameter manipulation was added to tests/functional/zvol/zvol_stress/zvol_stress.ksh testcase for both Linux and FreeBSD.
Types of changes
Checklist:
Signed-off-by
.