-
Notifications
You must be signed in to change notification settings - Fork 16
Update estat iscsi, zvol, and zpl scripts. #55
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
closes delphix#53, closes delphix#54
@@ -42,7 +46,7 @@ equal_to_pool(char *str) | |||
} | |||
|
|||
static inline int | |||
zfs_read_write_entry(io_info_t *info, struct inode *ip, uio_t *uio, int flags) | |||
zfs_read_write_entry(io_info_t *info, struct inode *ip, zfs_uio_t *uio, int flags) |
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.
Does this change work for all previous kernel versions? E.g. I'm curious about the case where a customer may upgrade, but continue running a kernel from a prior released (i.e. no reboot), would this script continue to work?
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.
No, that would be a problem.
We could deliver separate C scripts for each kernel version and then have the estat python script run the correct one. Is that a problem we want to solve?
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.
Is that a problem we want to solve?
I'd like to defer this question to the team.
Today, AFAIK, we do support deferred/non-reboot upgrades from any prior 6.0-based release to the latest one. So it's possible that we could have a system running the kernel bits from the 6.0.0.0 release, but the userland bits from the most recent 6.0.6.0 release.
In that case, I think these scripts would no longer work, since by design we only (currently) support running the scripts on the matching kernel for that release, right? So, we'd need to decide as a team, if it's OK for the scripts not to work in such a scenario.
If the current architecture of these scripts is to only work when run on the kernel version of the matching release (e.g. 6.0.6.0 scripts only work with the 6.0.6.0 kernel and modules), then I'll approve this, since it's consistent with our existing design decisions, even though I feel like that design is lacking and prone to failure on deferred upgrades.
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 agree, the current perf-diag design does not address deferred upgrade. It is something we should give some thought too. Changes to stbtrace scripts could be more problematic since they are used in analytics.
It does seem to be outside the scope of this PR. At a miniumum, the scripts should run on matching kernel versions.
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.
Brad, from my understanding those scripts are only run manually by support, is that right?
If that's the case then having them work for deferred upgrade is probably not a P1, but we should definitely create a bug and allocate time for it.
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.
While this specific script may only be run by support, as Brad mentioned, there's other scripts that are used by the product (for analytics) and may suffer from this same problem on deferred upgrade.
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.
Seb mentioned to me that we already have a bug tracking this. I was just unsuccessful finding it but I'll make sure there is a jira issue.
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.
Yeah, for other scripts that are used by analytics, I think supporting deferred upgrade is a must.
closes #53, closes #54
There is an undefined symbol fixed by adding an include statment. Additionally there are some warning messages involving the length of strings being passed to __builtin_memcpy. The script compiles and runs on trunk bits:
The main issues is that all uio_t arguments have been replaced by zfs_uio_t arguments. After fixing that issue the script wouldn't compile seeming to hit a limit on stackspace. I rewrote the string copying to use global constants and few local variables and that is working.
Examining the code in iscsi_target.c, it seems there is another path of execution for reads that does not involve calling iscsit_build_rsp_pdu() but instead calling iscsit_build_datain_pdu. With this extra exit point define the reads seem to be accounted for. There are some conditions involving sense data where both functions would be called for a single read. In that case the call to iscsit_build_datain_pdu() would go first and remove the hashed entry point record before the call to iscsit_build_rsp_pdu(). That seems appropriate as iscsit_build_rsp_pdu() is only adding the sense data. Additionally I noticed that the direction field in the iscsi_cmd structure provides a way to tell if an operation is a read or a write eliminating the need to store the header flags at the start of the operation.