All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Dave Chinner <david@fromorbit.com>,
	Mikulas Patocka <mpatocka@redhat.com>,
	Jens Axboe <axboe@kernel.dk>, Jooyung Han <jooyung@google.com>,
	Alasdair Kergon <agk@redhat.com>,
	Mike Snitzer <snitzer@kernel.org>,
	Heinz Mauelshagen <heinzm@redhat.com>,
	zkabelac@redhat.com, dm-devel@lists.linux.dev,
	linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	io-uring@vger.kernel.org
Subject: Re: [PATCH] the dm-loop target
Date: Tue, 18 Mar 2025 17:34:28 +0800	[thread overview]
Message-ID: <Z9k-JE8FmWKe0fm0@fedora> (raw)
In-Reply-To: <Z9knXQixQhs90j5F@infradead.org>

On Tue, Mar 18, 2025 at 12:57:17AM -0700, Christoph Hellwig wrote:
> On Tue, Mar 18, 2025 at 03:27:48PM +1100, Dave Chinner wrote:
> > Yes, NOWAIT may then add an incremental performance improvement on
> > top for optimal layout cases, but I'm still not yet convinced that
> > it is a generally applicable loop device optimisation that everyone
> > wants to always enable due to the potential for 100% NOWAIT
> > submission failure on any given loop device.....

NOWAIT failure can be avoided actually:

https://lore.kernel.org/linux-block/20250314021148.3081954-6-ming.lei@redhat.com/

> 
> Yes, I think this is a really good first step:
> 
> 1) switch loop to use a per-command work_item unconditionally, which also
>    has the nice effect that it cleans up the horrible mess of the
>    per-blkcg workers.  (note that this is what the nvmet file backend has

It could be worse to take per-command work, because IO handling crosses
all system wq worker contexts.

>    always done with good result)

per-command work does burn lots of CPU unnecessarily, it isn't good for
use case of container, and it can not perform as well as NOWAIT.

> 2) look into NOWAIT submission, especially for reads this should be
>    a clear winner and probaby done unconditionally.  For writes it
>    might be a bit of a tradeoff if we expect the writes to allocate
>    a lot, so we might want some kind of tunable for it.

It is a winner for over-write too.

WRITE with allocation can be kept to submit from wq context, see my
patchset V2.


Thanks,
Ming


  reply	other threads:[~2025-03-18  9:34 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-03 10:24 [PATCH] the dm-loop target Mikulas Patocka
2025-03-03 13:59 ` Christoph Hellwig
     [not found]   ` <CAM23VxprhJgOPfhxQf6QNWzHd6+-ZwbjSo-oMHCD2WDQiKntMg@mail.gmail.com>
2025-03-03 15:13     ` Christoph Hellwig
2025-03-03 15:22       ` Matthew Wilcox
2025-03-03 15:31         ` Christoph Hellwig
     [not found]       ` <CAM23VxprSduDDK8qvLVkUt9WWmLMPFjhqKB8X4e6gw7Wv-6R2w@mail.gmail.com>
2025-03-03 17:24         ` Christoph Hellwig
     [not found]           ` <CAM23Vxoxyrf9nwJd1Xe8uncAPiyK8yaNZNsugwX8p=qo1n6yVg@mail.gmail.com>
2025-03-04 13:52             ` Christoph Hellwig
2025-03-03 16:16   ` Mikulas Patocka
2025-03-03 17:24     ` Christoph Hellwig
2025-03-03 21:03       ` Mikulas Patocka
2025-03-04  2:13         ` Dave Chinner
2025-03-04 11:18           ` Mikulas Patocka
2025-03-04 13:50             ` Christoph Hellwig
2025-03-05  0:01             ` Dave Chinner
2025-03-07 15:21               ` Mikulas Patocka
2025-03-08  3:49                 ` Darrick J. Wong
2025-03-08 20:45                   ` Mikulas Patocka
2025-03-09  0:05                 ` Ming Lei
2025-03-10 11:18                   ` Mikulas Patocka
2025-03-11  1:27                     ` Dave Chinner
2025-03-11 10:43                       ` Ming Lei
2025-03-12  2:34                         ` Dave Chinner
2025-03-12  6:24                           ` Christoph Hellwig
2025-03-12  8:26                           ` Ming Lei
2025-03-13  1:36                             ` Ming Lei
2025-03-13 16:36                             ` Mikulas Patocka
2025-03-18  4:27                               ` Dave Chinner
2025-03-18  7:57                                 ` Christoph Hellwig
2025-03-18  9:34                                   ` Ming Lei [this message]
2025-03-20  7:08                                     ` Christoph Hellwig
2025-03-20  7:41                                       ` Ming Lei
2025-03-20 14:22                                         ` Christoph Hellwig
2025-03-20 14:36                                           ` Ming Lei
2025-03-25 10:15                                         ` Dave Chinner
2025-03-25 12:23                                           ` Ming Lei
2025-03-09  0:16                 ` Ming Lei
2025-03-10 11:20                   ` Mikulas Patocka
2025-03-04 13:49         ` Christoph Hellwig
     [not found]           ` <CAM23Vxr=fKy-0L1R5P-5h6A95acKT_d=CC1E+TAzAs8v6q9gHw@mail.gmail.com>
2025-03-04 16:04             ` Christoph Hellwig
     [not found]               ` <CAM23VxqJX46DCpCiH5qxPpDLtMVg87Ba8sx55aQ4hvt-XaHzuQ@mail.gmail.com>
2025-03-04 17:17                 ` Christoph Hellwig
2025-03-12 13:26           ` Kent Overstreet
2025-03-12 14:20             ` Christoph Hellwig
2025-03-12 16:09               ` Kent Overstreet
2025-03-13 12:44                 ` Christoph Hellwig
2025-03-13 16:21               ` Mikulas Patocka
2025-03-13 16:33                 ` Kent Overstreet
2025-03-03 16:55 ` Bryn M. Reeves
2025-03-03 17:06   ` Mikulas Patocka
2025-03-03 17:18     ` Bryn M. Reeves

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=Z9k-JE8FmWKe0fm0@fedora \
    --to=ming.lei@redhat.com \
    --cc=agk@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=david@fromorbit.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=hch@infradead.org \
    --cc=heinzm@redhat.com \
    --cc=io-uring@vger.kernel.org \
    --cc=jooyung@google.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=snitzer@kernel.org \
    --cc=zkabelac@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.