Closed zhangting9756 closed 11 months ago
@pchengcui
@chenhengqi @yonghong-song can you review this PR ? thanks.
I think this pid filtering thing may not work in such cases, e.g., blk_account_io_start() is often not called in sycall process context. When an IO operation is initialized by user space, the kernel in general will do blk_queue_bio() to queue the IO and returns to the user space. Later blk_account_io_start() will be done by per-cpu IO thread (maybe something else). So I am not sure this pid based filtering works or not for blk_account_io_start(). Similarly, the same case for other functions.
I think this pid filtering thing may not work in such cases, e.g., blk_account_io_start() is often not called in sycall process context. When an IO operation is initialized by user space, the kernel in general will do blk_queue_bio() to queue the IO and returns to the user space. Later blk_account_io_start() will be done by per-cpu IO thread (maybe something else). So I am not sure this pid based filtering works or not for blk_account_io_start(). Similarly, the same case for other functions.
Thanks for the reply, PID may be lost in this case. However, this situation is in the minority, and I think it is acceptable. This situation may also exist in the corresponding /tools/biotop.py.
Okay, will merge the patch since we have biotop precedence.
-p option for tracking a specific pid in tools/biotop which filters target PID to avoid message flooding. So, adding -p option to filter pid is necessary.