mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dexuan Cui <decui@microsoft.com>
To: Jens Axboe <axboe@kernel.dk>,
	"'ming.lei@redhat.com'" <ming.lei@redhat.com>,
	'Christoph Hellwig' <hch@lst.de>,
	"'linux-block@vger.kernel.org'" <linux-block@vger.kernel.org>
Cc: Long Li <longli@microsoft.com>,
	"Michael Kelley (LINUX)" <mikelley@microsoft.com>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
Subject: RE: Random high CPU utilization in blk-mq with the none scheduler
Date: Tue, 14 Dec 2021 00:43:30 +0000	[thread overview]
Message-ID: <BYAPR21MB1270FCF502C458139F89AF7CBF759@BYAPR21MB1270.namprd21.prod.outlook.com> (raw)
In-Reply-To: <bb696622-38ee-c582-ce70-5bfa632f8989@kernel.dk>

From: Jens Axboe <axboe@kernel.dk>
> Sent: Monday, December 13, 2021 10:43 AM
> 
> I wonder if this will help, SCSI artifact making us hit the
> mod delayed work path all the time. 

Yes, I think this is what's happening here.

> Might be a race in there, but should be fine for testing.
> 
> 
> diff --git a/block/blk-core.c b/block/blk-core.c
> index 4d8f5fe91588..cb2f4d604bad 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -1625,7 +1625,9 @@ EXPORT_SYMBOL(kblockd_schedule_work);
>  int kblockd_mod_delayed_work_on(int cpu, struct delayed_work *dwork,
>  				unsigned long delay)
>  {
> -	return mod_delayed_work_on(cpu, kblockd_workqueue, dwork, delay);
> +	if (!work_pending(&dwork->work))
> +		return mod_delayed_work_on(cpu, kblockd_workqueue, dwork,
> delay);
> +	return true;
>  }
>  EXPORT_SYMBOL(kblockd_mod_delayed_work_on);
> --
> Jens Axboe

Thanks very much! This path works!

In the test, "v5.16-rc4 + reverting dc5fc361d891 
("block: attempt direct issue of plug list") + this patch" shows a good I/O
performance that's about the same as v5.16-rc4.

I suppose "v5.16-rc4 + this patch" would show a slightly even better
performance.

It would be great if you can commit this small patch so that it can be
backported to old stable kernels.

Thanks,
Dexuan

  reply	other threads:[~2021-12-14  0:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10  3:30 Dexuan Cui
2021-12-11  1:29 ` Dexuan Cui
2021-12-11  2:04   ` Jens Axboe
2021-12-11  3:10     ` Dexuan Cui
2021-12-11  3:15       ` Jens Axboe
2021-12-11  3:44         ` Dexuan Cui
2021-12-11  7:09           ` Dexuan Cui
2021-12-11 14:21             ` Jens Axboe
2021-12-11 18:54               ` Dexuan Cui
2021-12-13 18:43                 ` Jens Axboe
2021-12-14  0:43                   ` Dexuan Cui [this message]
2021-12-13  3:23       ` Ming Lei
2021-12-13  4:20         ` Dexuan Cui
2021-12-13  7:38           ` Ming Lei
2021-12-14  0:31             ` Dexuan Cui
2021-12-14  0:53               ` Ming Lei
2021-12-14  3:09                 ` Dexuan Cui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BYAPR21MB1270FCF502C458139F89AF7CBF759@BYAPR21MB1270.namprd21.prod.outlook.com \
    --to=decui@microsoft.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=mikelley@microsoft.com \
    --cc=ming.lei@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®