stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Coly Li <colyli@suse.de>
Cc: stable@vger.kernel.org, Dave Chinner <david@fromorbit.com>,
	Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH] bcache: use (REQ_META|REQ_PRIO) to indicate bio for metadata
Date: Fri, 22 Mar 2019 12:03:20 +0100	[thread overview]
Message-ID: <20190322110320.GA26607@kroah.com> (raw)
In-Reply-To: <20190322074844.17341-1-colyli@suse.de>

On Fri, Mar 22, 2019 at 03:48:44PM +0800, Coly Li wrote:
> In 'commit 752f66a75aba ("bcache: use REQ_PRIO to indicate bio for
> metadata")' REQ_META is replaced by REQ_PRIO to indicate metadata bio.
> This assumption is not always correct, e.g. XFS uses REQ_META to mark
> metadata bio other than REQ_PRIO. This is why Nix noticed that bcache
> does not cache metadata for XFS after the above commit.
> 
> Thanks to Dave Chinner, he explains the difference between REQ_META and
> REQ_PRIO from view of file system developer. Here I quote part of his
> explanation from mailing list,
>    REQ_META is used for metadata. REQ_PRIO is used to communicate to
>    the lower layers that the submitter considers this IO to be more
>    important that non REQ_PRIO IO and so dispatch should be expedited.
> 
>    IOWs, if the filesystem considers metadata IO to be more important
>    that user data IO, then it will use REQ_PRIO | REQ_META rather than
>    just REQ_META.
> 
> Then it seems bios with REQ_META or REQ_PRIO should both be cached for
> performance optimation, because they are all probably low I/O latency
> demand by upper layer (e.g. file system).
> 
> So in this patch, when we want to decide whether to bypass the cache,
> REQ_META and REQ_PRIO are both checked. Then both metadata and
> high priority I/O requests will be handled properly.
> 
> (Coly Li: backport the original patch for Linux-stable v4.19)

Now queued up, thanks.

greg k-h

      reply	other threads:[~2019-03-22 11:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22  7:48 [PATCH] bcache: use (REQ_META|REQ_PRIO) to indicate bio for metadata Coly Li
2019-03-22 11:03 ` Greg KH [this message]

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=20190322110320.GA26607@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=axboe@kernel.dk \
    --cc=colyli@suse.de \
    --cc=david@fromorbit.com \
    --cc=hch@lst.de \
    --cc=stable@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).