[Devel] [PATCH RHEL7 COMMIT] fuse: don't perform getattr on each write
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Nov 5 11:36:07 MSK 2019
The commit is pushed to "branch-rh7-3.10.0-1062.4.1.vz7.115.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1062.4.1.vz7.115.8
------>
commit f434f30ce9b7e1409e3feb3cae097a1af3a771a3
Author: Vasily Averin <vvs at virtuozzo.com>
Date: Tue Nov 5 11:36:05 2019 +0300
fuse: don't perform getattr on each write
Mainline version of "fuse: Turn writeback cache on" patch
(4d99ff8f12eb) added an extra fuse_update_attributes() call. Comparing
with previous version it leads to additions getattr calls from kernel
for each write and leads to significant performance degradation.
According to ANK it is wrong, in fuse mode with enabled write cache
kernel is responsible for attributes, they should not be invalidated
and getattr should be called for open()/stat() only.
This patch fixes vstorage performance degradation.
https://jira.sw.ru/browse/PSBM-99138
Signed-off-by: Vasily Averin <vvs at virtuozzo.com>
---
fs/fuse/file.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index cfafff050de8..3a3637cddb03 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1560,11 +1560,12 @@ static ssize_t fuse_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
loff_t endbyte = 0;
if (get_fuse_conn(inode)->writeback_cache) {
+#if 0 /* fixes performance degradation PSBM-99138 /*
/* Update size (EOF optimization) and mode (SUID clearing) */
err = fuse_update_attributes(mapping->host, NULL, file, NULL);
if (err)
return err;
-
+#endif
return generic_file_aio_write(iocb, iov, nr_segs, pos);
}
More information about the Devel
mailing list