Skip to content

estat backend-io script complains about missing blk_start_request kpr… #68

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

Merged
merged 2 commits into from
Dec 9, 2021

Conversation

mr-t-73
Copy link
Contributor

@mr-t-73 mr-t-73 commented Sep 20, 2021

…obecloses #45

Reproduce the issue:

^Croot@ip-10-110-230-146:/usr/share/performance-diagnostics/bpf/estat# estat backend-io -m 5
WARNING: kprobe: blk_start_request - not found
09/20/21 - 05:04:13 UTC

 Tracing enabled... Hit Ctrl-C to end.

Function call not available in the kernel:

# cat /proc/kallsyms |grep blk_start_request
# 

Not available as a configured kprobe either:

# cat /sys/kernel/debug/kprobes/list |grep blk
ffffffffab0c4640  k  blk_account_io_completion+0x0    [FTRACE]
ffffffffab0ccb00  k  blk_mq_start_request+0x0    [FTRACE]

So, its a part of disk_io_start (the disco ;-) in the script backend-io.c:

vi /usr/share/performance-diagnostics/bpf/estat/backend-io.c 
...
 32 // @@ kprobe|blk_start_request|disk_io_start
 33 // @@ kprobe|blk_mq_start_request|disk_io_start
 34 int
 35 disk_io_start(struct pt_regs *ctx, struct request *reqp)
 36 {

Not present anywhere in the ubuntu source:

$ git grep blk_start_request
$

but mq is:

$ git grep blk_mq_start_request
arch/um/drivers/ubd_kern.c:     blk_mq_start_request(req);
block/blk-mq.c: * blk_mq_start_request - Start processing a request
block/blk-mq.c:void blk_mq_start_request(struct request *rq)
...
include/linux/blk-mq.h:void blk_mq_start_request(struct request *rq);

The Multi-Queue Block I/O Queuing Mechanism (blk-mq) was introduced in Oct 2013 with commit:

320ae51feed5c2f13664aa05a76bec198967e04d

blk-mq deprecated blk_start_request()
blk_start_request() was removed in Nov 2018 with:

$ git show f664a3cc17b7d0a2bc3b3ab96181e1029b0ec0e6
commit f664a3cc17b7d0a2bc3b3ab96181e1029b0ec0e6
Author: Jens Axboe <axboe@kernel.dk>
Date:   Thu Nov 1 16:36:27 2018 -0600

    scsi: kill off the legacy IO path
    
    This removes the legacy (non-mq) IO path for SCSI.

Summary:

  • The classic I/O scheduler was replaced in Oct 2013.
  • Calls to blk_start_request() were replaced by blk_mq_start_request().
  • This probe should be removed.
  • Tested with probe removed. No error, I/O throughput / latency values look good:
# estat backend-io -m 60
09/20/21 - 07:14:44 UTC

 Tracing enabled... Hit Ctrl-C to end.
   microseconds                                                   write 
value range                 count ------------- Distribution ------------- 
[300, 400)                     25 |@                                       
[400, 500)                   1340 |@                                       
[500, 600)                   3756 |@                                       
[600, 700)                   4606 |@                                       
[700, 800)                   6442 |@@                                      
[800, 900)                  10238 |@@                                      
[900, 1000)                  9253 |@@                                      
[1000, 2000)                42302 |@@@@@@@@@                               
[2000, 3000)                44178 |@@@@@@@@@                               
[3000, 4000)                57406 |@@@@@@@@@@@@                            
[4000, 5000)                14508 |@@@                                     
[5000, 6000)                 7366 |@@                                      
[6000, 7000)                 3655 |@                                       
[7000, 8000)                 1038 |@                                       
[8000, 9000)                  300 |@                                       
[9000, 10000)                 180 |@                                       
[10000, 20000)                608 |@                                       
[20000, 30000)                416 |@                                       
[30000, 40000)                128 |@                                       
[40000, 50000)                 14 |@                                       

                                       iops(/s)  avg latency(us)       stddev(us)  throughput(k/s)
write                                      3462             2703          4085849            25772


                                       iops(/s)  throughput(k/s)
total                                      3462            25773


09/20/21 - 07:15:44 UTC

Copy link
Contributor

@brad-lewis brad-lewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@brad-lewis brad-lewis merged commit 5cb1777 into delphix:master Dec 9, 2021
brad-lewis added a commit to brad-lewis/performance-diagnostics that referenced this pull request Dec 21, 2021
…obecloses delphix#45 (delphix#68)

Co-authored-by: Brad Lewis <brad.lewis@delphix.com>
brad-lewis added a commit to brad-lewis/performance-diagnostics that referenced this pull request Dec 21, 2021
…obecloses delphix#45 (delphix#68)

Co-authored-by: Brad Lewis <brad.lewis@delphix.com>
brad-lewis added a commit to brad-lewis/performance-diagnostics that referenced this pull request Dec 21, 2021
…obecloses delphix#45 (delphix#68)

Co-authored-by: Brad Lewis <brad.lewis@delphix.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants