-
Notifications
You must be signed in to change notification settings - Fork 82
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
Ioctl interrupt #231
Merged
Merged
Ioctl interrupt #231
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mmichal10
force-pushed
the
ioclt-interrupt
branch
5 times, most recently
from
December 19, 2019 11:24
8dd1833
to
f14d78f
Compare
mmichal10
force-pushed
the
ioclt-interrupt
branch
6 times, most recently
from
December 20, 2019 12:08
b5c15ce
to
2156544
Compare
arutk
requested changes
Dec 20, 2019
arutk
reviewed
Dec 20, 2019
arutk
requested changes
Dec 20, 2019
mmichal10
force-pushed
the
ioclt-interrupt
branch
from
December 23, 2019 11:33
2156544
to
acc9ab7
Compare
arutk
requested changes
Dec 23, 2019
arutk
requested changes
Dec 23, 2019
arutk
reviewed
Dec 23, 2019
arutk
reviewed
Dec 23, 2019
mmichal10
force-pushed
the
ioclt-interrupt
branch
from
December 23, 2019 12:58
acc9ab7
to
f8832e5
Compare
arutk
requested changes
Dec 23, 2019
mmichal10
force-pushed
the
ioclt-interrupt
branch
from
December 27, 2019 10:59
77bd20d
to
839ebf4
Compare
arutk
requested changes
Dec 27, 2019
robertbaldyga
requested changes
Dec 30, 2019
mmichal10
force-pushed
the
ioclt-interrupt
branch
from
December 30, 2019 14:12
839ebf4
to
9f4cb34
Compare
mmichal10
force-pushed
the
ioclt-interrupt
branch
4 times, most recently
from
January 2, 2020 14:19
37a4be6
to
546f90b
Compare
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
After marking thread as ready to stop, CAS was waiting this for thread to exit out of main execution loop (in _cas_io_queue_thread()). In case of management queue it lead to deadlock because both stoping queue and main execution loop was performed in the same execution context. Since freeing memory is the only operation after stopping thread, it can be moved just after the main thread loop. After this little reordering, synchronising between _cas_stop_thread() and _cas_io_queue_thread() in no longer needed, and no deadlock will occur. This change is needed to put management qeueue from completion context. Without this cachnge, there will be no possiblitiy to stop cache from completion context and to make rollback. Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
mmichal10
force-pushed
the
ioclt-interrupt
branch
2 times, most recently
from
January 2, 2020 15:36
6f9802c
to
585ae01
Compare
Usually metadata probe is non time consuming. To avoid dealing with synchronization problems, noninterruptible wait is performed. This commit is part of patch that will handle interrupt of waiting for OCF operations. Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
They are usually not time comsuming operations, so risk of hung task is low. So it's easier to temporarily disable interrupts instead of properly handle async completion. This commit is part of patch that will handle interrupt of waiting for OCF operations. Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is part of patch that will allow to interrupt waiting for OCF operation. Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
When context was allocated on the stack and waiting for completion was interrupted, completion function would attempt to save lock/unlock result in memory which might in use by other process. This would cause a system crash. To prevent such scenario, context is allocated dynamiclly and extended with reference counter. In case of interrupt, completion function doesn't have to save result in context, it can simply free it's memory. This commit is part of patch that will allow to interrupt waiting for OCF operations. Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
When context was allocated on the stack and waiting for completion was interrupted, completion function would attempt to save flush result in memory which might in use by other process. This would cause a system crash. To prevent such scenario, context is allocated dynamiclly and extended with reference counter. In case of interrupt, completion function doesn't have to save result in context, it can simply free it's memory. This commit is part of patch that will allow to interrupt waiting for OCF operations. Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
When context was allocated on the stack and waiting for completion was interrupted, completion function would attempt to save flush result in memory which might in use by other process. This would cause a system crash. To prevent such scenario, context is allocated dynamiclly and extended with reference counter. In case of interrupt, completion function doesn't have to save result in context, it can simply free it's memory. This commit also enables possibility to interrupt regular flush properly, by seding SIGING to casadm. This commit is part of patch that will allow to interrupt waiting for OCF operations. Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
When device used as cache had a big size, it took a lot of time to initialize. If user would interrupt waiting, asyc OCF init procedure would continue, but after finish, there was nobody to perfrom kernel part of start nor error handling. Now error handling and kernel part of start procedure are moved to completion. If user will interrupt waiting at any point, newly started cache instance will be stopped. Since cache init and load vary only with check for old metadata and initializing exported objects, they are now merged into one function. Async cache stop is part of this commit because it was needed for rollback path. Load, init and stop have common context, because in case of non interrupted attach CAS needs to wait for rollback to be completed. Common context makes passing `struct completion` easier between load, init and stop. This commit is part of patch that will allow to interrupt waiting for OCF operations. Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
In current OCF cache stop implemetation no error should occur, so there is no need to handle it in adapter. Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
If waiting for the operation to finish was interrupted, casadm should print informative error message. Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
mmichal10
force-pushed
the
ioclt-interrupt
branch
4 times, most recently
from
January 3, 2020 15:38
c9aa8e7
to
9a42ad7
Compare
arutk
approved these changes
Jan 3, 2020
robertbaldyga
approved these changes
Jan 4, 2020
vzhereb9
pushed a commit
to vzhereb9/open-cas-linux
that referenced
this pull request
Jun 14, 2021
…policy Initialize promotion policy before cleaning policy.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.