Messages in this thread | | | Date | Wed, 20 Oct 2021 14:32:48 +0200 | From | Greg KH <> | Subject | Re: [PATCH stable-4.14.y] btrfs: always wait on ordered extents at fsync time |
| |
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
| |