public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Anand Jain <anand.jain@oracle.com>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	linux-btrfs@vger.kernel.org, Josef Bacik <jbacik@fb.com>,
	Filipe Manana <fdmanana@suse.com>
Subject: Re: [PATCH stable-4.14.y] btrfs: always wait on ordered extents at fsync time
Date: Wed, 20 Oct 2021 14:32:48 +0200	[thread overview]
Message-ID: <YXAMcAnZ13E/Lmmq@kroah.com> (raw)
In-Reply-To: <4fb0d755f4265d71b2a0d314232e53b22067fb0b.1634624427.git.anand.jain@oracle.com>

On Tue, Oct 19, 2021 at 06:38:20PM +0800, Anand Jain wrote:
> From: Josef Bacik <jbacik@fb.com>
> 
> Commit b5e6c3e170b77025b5f6174258c7ad71eed2d4de upstream.
> 
> There's a priority inversion that exists currently with btrfs fsync.  In
> some cases we will collect outstanding ordered extents onto a list and
> only wait on them at the very last second.  However this "very last
> second" falls inside of a transaction handle, so if we are in a lower
> priority cgroup we can end up holding the transaction open for longer
> than needed, so if a high priority cgroup is also trying to fsync()
> it'll see latency.
> 
> Signed-off-by: Josef Bacik <jbacik@fb.com>
> Reviewed-by: Filipe Manana <fdmanana@suse.com>
> Signed-off-by: David Sterba <dsterba@suse.com>
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
>  fs/btrfs/file.c | 56 ++++---------------------------------------------
>  1 file changed, 4 insertions(+), 52 deletions(-)

Now applied, thanks.

greg k-h

      reply	other threads:[~2021-10-20 12:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19 10:38 [PATCH stable-4.14.y] btrfs: always wait on ordered extents at fsync time Anand Jain
2021-10-20 12:32 ` 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=YXAMcAnZ13E/Lmmq@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=anand.jain@oracle.com \
    --cc=fdmanana@suse.com \
    --cc=jbacik@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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