RE: Random high CPU utilization in blk-mq with the none scheduler

From: Dexuan Cui
Date: Sat Dec 11 2021 - 02:10:05 EST


> From: Dexuan Cui
> Sent: Friday, December 10, 2021 7:45 PM
>
> > From: Jens Axboe <axboe@xxxxxxxxx>
> >
> > Just out of curiosity, can you do:
> >
> > # perf record -a -g -- sleep 3
> >
> > when you see the excessive CPU usage, then attach the output of
> >
> > # perf report -g
> >
> > to a reply?

I realized you only asked for the output of "pref report -g", which
is much smaller. Please see the attachment for it.
try_to_grab_pending() is the hottest function, e.g. see line 2479.

It's generated using v5.16-rc4 with the 3 commits reverted:
b22809092c70 ("block: replace always false argument with 'false'")
ff1552232b36 ("blk-mq: don't issue request directly in case that current is to be blocked")
dc5fc361d891 ("block: attempt direct issue of plug list")

> > How confident are you in your bisect result?
> >
> > Jens Axboe

I did some tests again and I'm pretty confident that the commit
b22809092c70 resolves the excessive CPU usage.

Thanks,
Dexuan

Attachment: perf.data.output.log.bz2
Description: perf.data.output.log.bz2