-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Incorrect result while running biolatency.py with flags option on kernel 4.9.266 #3587
Comments
See #3540 |
Hi @chenhengqi As far as I know, the In the meantime, the definition of
|
How about making this change to https://github.com/iovisor/bcc/tree/master/tools/old ? |
@ismhong As @chenhengqi suggested, let us just put the tools supporting the old kernel into old directory with some comments on it. Otherwise, tools may become too complicated and hard to maintain. |
Environment: Linux kernel 4.9.266 on aarch64 platform
Issue: There is no "Write" operation while running biolatency.py with flags option on kernel 4.9.266, the workload is
dd if=/dev/zero of=/mnt/sda1 bs=1M count=64
, but it works fine with Linux kernel 5.10.46 on the same platformThe incorrect result attached at the end.
I have made some investigation and find the root cause.
Linux kernel 4.10 and later, the definition of
cmd_flags
ofstruct request
ininclude/linux/blkdev.h
is changed by patchset.There is a fix (#889) for bcc tool (biosnoop, biotop) related to this kernel changes.
The implementation of biolatency is passing the
cmd_flags
ofstruct reqeust
back to user space, and Python part (https://github.com/iovisor/bcc/blob/master/tools/biolatency.py#L183) to analyze the meaning of cmd_flags.I have made a local changes for biolatency to fit the data layout of cmd_flags for Linux kernel 4.9, and everything works correctly, but I am not sure how to make a coexist changes to fit both different kernel data layout.
For req_op, maybe we can reference to the changes of biosnoop/biotop to extract req_op in BPF program, but the definition of req_flags is totally different between two data layout.
I am wondering there is any more correct way to make a fix for this issue. Could you please give me some advice for it? Thank you.
4.9.266
The text was updated successfully, but these errors were encountered: