-
Notifications
You must be signed in to change notification settings - Fork 47
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
find_namespace_and_bdev_name #449
Comments
@baum I have few comments:
|
My intention is code simplification: bdev = self.subsystem_nsid_bdev[nqn][nsid] seems easier than find_namespace_and_bdev_name WDYT?
👍
👍 |
I think we can do it. Currently I see that the find_namespace_and_bdev_name is also getting uuid as an argument. If we do this change, it means that the lookup will always be by uuid? @gbregman do you see any reason not to make this change? If we already have the information cached (after recent changes), then we can save these extra calls? |
@caroav , I don't see any reason to do this change. |
@gbregman every call to find_ns method is a call to the SPDK get_subsystems, while this change saves this call. That's the reason that I see. |
The call in change_load_balancing group is just in case the user didn't pass the namespace NSID and wanted to use UUID instead. We can drop it and force the usage of NSID but I don't see the real benefit from this. In all other places we use this function we need the bdev details as we need to pass them to SPDK. This is not something we currently have in the local state. I don't think it's worth it to write new code to take care of that locally as these CLIs are not common and not time critical. Calling the SPDK is not such a big deal as it uses a local socket and doesn't go out to the network. Holding the OMAP lock is less of a problem then holding the RPC lock and we do that when we call get_subsystems every 2 seconds for the monitor client. This is a much bigger issue. |
Why holding the OMAP lock is less than holding the RPC lock? |
The only place we call the find function with the OMAP lock taken is in namespace delete. The get stats, get/set QOS and namespace resize do not change the OMAP so they don't take the OMAP lock. In principle we can also call find in change load balancing group but this is only if the user chose to call the command without NSID. |
Fixes ceph#449 Signed-off-by: Gil Bregman <[email protected]>
Fixes ceph#449 Signed-off-by: Gil Bregman <[email protected]>
Fixes ceph#449 Signed-off-by: Gil Bregman <[email protected]>
Fixes ceph#449 Signed-off-by: Gil Bregman <[email protected]>
Fixes ceph#449 Signed-off-by: Gil Bregman <[email protected]>
Fixes ceph#449 Signed-off-by: Gil Bregman <[email protected]>
Fixes ceph#449 Signed-off-by: Gil Bregman <[email protected]>
Fixes ceph#449 Signed-off-by: Gil Bregman <[email protected]>
Fixes ceph#449 Signed-off-by: Gil Bregman <[email protected]>
Fixes ceph#449 Signed-off-by: Gil Bregman <[email protected]>
Fixes ceph#449 Signed-off-by: Gil Bregman <[email protected]>
Background
find_namespace_and_bdev_name is used to associate between existing NVME namespace and its SPDK bdev. Currently implemented in terms of SPDK JSON RPC nvmf_get_subsystems sometimes holding omap_lock. The function is used in the following contexts:
Suggestion
namespace_resize_req
,namespace_get_io_stats_req
,namespace_set_qos_req
andnamespace_delete_req
)The text was updated successfully, but these errors were encountered: